diff --git a/src/libs/actions/TwoFactorAuthActions.ts b/src/libs/actions/TwoFactorAuthActions.ts index 949c0c2620b2..26e402096aa6 100644 --- a/src/libs/actions/TwoFactorAuthActions.ts +++ b/src/libs/actions/TwoFactorAuthActions.ts @@ -1,7 +1,7 @@ import Onyx from 'react-native-onyx'; import Navigation from '@libs/Navigation/Navigation'; import ONYXKEYS from '@src/ONYXKEYS'; -import ROUTES from '@src/ROUTES'; +import ROUTES, {Route} from '@src/ROUTES'; import {TwoFactorAuthStep} from '@src/types/onyx/Account'; /** @@ -18,7 +18,7 @@ function setCodesAreCopied() { Onyx.merge(ONYXKEYS.ACCOUNT, {codesAreCopied: true}); } -function quitAndNavigateBack(backTo?: string) { +function quitAndNavigateBack(backTo?: Route) { clearTwoFactorAuthData(); // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing Navigation.goBack(backTo || ROUTES.SETTINGS_SECURITY);