diff --git a/src/components/Lottie/index.tsx b/src/components/Lottie/index.tsx index 25e9ed77b2f3..ea30161175e7 100644 --- a/src/components/Lottie/index.tsx +++ b/src/components/Lottie/index.tsx @@ -9,8 +9,8 @@ import useAppState from '@hooks/useAppState'; import useNetwork from '@hooks/useNetwork'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Browser from '@libs/Browser'; +import isSideModalNavigator from '@libs/Navigation/isSideModalNavigator'; import CONST from '@src/CONST'; -import NAVIGATORS from '@src/NAVIGATORS'; import {useSplashScreenStateContext} from '@src/SplashScreenStateContext'; type Props = { @@ -55,7 +55,7 @@ function Lottie({source, webStyle, ...props}: Props, ref: ForwardedRef { const state = navigationContainerRef.getRootState(); const targetRouteName = state?.routes?.[state?.index ?? 0]?.name; - if (targetRouteName !== NAVIGATORS.RIGHT_MODAL_NAVIGATOR) { + if (!isSideModalNavigator(targetRouteName)) { setHasNavigatedAway(true); } });