Skip to content

Commit

Permalink
feat: adapte auto leave with new loader structure
Browse files Browse the repository at this point in the history
  • Loading branch information
hel-axelor committed Feb 2, 2024
1 parent da78ed7 commit 6322034
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/core/src/components/templates/Loader/LoaderPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ const LoaderPopup = ({
});

useEffect(() => {
if (autoLeave || notifyMe) {
if (notifyMe) {
navigation.goBack();
}
}, [navigation, autoLeave, notifyMe]);
}, [navigation, notifyMe]);

useEffect(() => {
if (runProccess) {
Expand All @@ -88,7 +88,8 @@ const LoaderPopup = ({

timeoutRef.current = setTimeout(() => {
setActivityIndicator(false);
setShowPopup(true);

autoLeave ? setNotifyMe(true) : setShowPopup(true);
}, timeout);
}

Expand All @@ -101,6 +102,7 @@ const LoaderPopup = ({
loading,
showPopup,
autoLeave,
setNotifyMe,
setActivityIndicator,
setShowPopup,
]);
Expand Down

0 comments on commit 6322034

Please sign in to comment.