Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/hooks/useOnboardingFlow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function useOnboardingFlowRouter() {
useEffect(() => {
// This should delay opening the onboarding modal so it does not interfere with the ongoing ReportScreen params changes
// eslint-disable-next-line @typescript-eslint/no-deprecated
InteractionManager.runAfterInteractions(() => {
const handle = InteractionManager.runAfterInteractions(() => {
// Prevent starting the onboarding flow if we are logging in as a new user with short lived token
if (currentUrl?.includes(ROUTES.TRANSITION_BETWEEN_APPS) && isLoggingInAsNewSessionUser) {
return;
Expand Down Expand Up @@ -146,6 +146,10 @@ function useOnboardingFlowRouter() {
});
}
});

return () => {
handle.cancel();
};
}, [
isLoadingApp,
isHybridAppOnboardingCompleted,
Expand Down
Loading