From 5812b4e19ea65f031025b446af9dc0c04c229ddc Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Thu, 12 Sep 2024 13:33:40 +0700 Subject: [PATCH 1/7] fix magic code expired is shown briefly --- src/libs/actions/Session/index.ts | 5 +++++ src/pages/ValidateLoginPage/index.website.tsx | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/libs/actions/Session/index.ts b/src/libs/actions/Session/index.ts index ab209e9bf928..3a9d92008809 100644 --- a/src/libs/actions/Session/index.ts +++ b/src/libs/actions/Session/index.ts @@ -704,6 +704,10 @@ function initAutoAuthState(cachedAutoAuthState: AutoAuthState) { }); } +function clearAutoAuthState() { + Onyx.merge(ONYXKEYS.SESSION, {autoAuthState: null}); +} + function invalidateCredentials() { Onyx.merge(ONYXKEYS.CREDENTIALS, {autoGeneratedLogin: '', autoGeneratedPassword: ''}); } @@ -1119,6 +1123,7 @@ export { handleExitToNavigation, signInWithValidateCodeAndNavigate, initAutoAuthState, + clearAutoAuthState, signInWithShortLivedAuthToken, cleanupSession, signOut, diff --git a/src/pages/ValidateLoginPage/index.website.tsx b/src/pages/ValidateLoginPage/index.website.tsx index 13f636867852..f86a32f3c551 100644 --- a/src/pages/ValidateLoginPage/index.website.tsx +++ b/src/pages/ValidateLoginPage/index.website.tsx @@ -1,4 +1,4 @@ -import React, {useEffect} from 'react'; +import React, {useEffect, useRef} from 'react'; import {withOnyx} from 'react-native-onyx'; import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; import ExpiredValidateCodeModal from '@components/ValidateCode/ExpiredValidateCodeModal'; @@ -19,6 +19,7 @@ function ValidateLoginPage({ }, session, }: ValidateLoginPageProps) { + const firstRenderRef = useRef(true); const login = credentials?.login; const autoAuthState = session?.autoAuthState ?? CONST.AUTO_AUTH_STATE.NOT_STARTED; const isSignedIn = !!session?.authToken && session?.authTokenType !== CONST.AUTH_TOKEN_TYPES.ANONYMOUS; @@ -27,6 +28,14 @@ function ValidateLoginPage({ const isUserClickedSignIn = !login && isSignedIn && (autoAuthState === CONST.AUTO_AUTH_STATE.SIGNING_IN || autoAuthState === CONST.AUTO_AUTH_STATE.JUST_SIGNED_IN); const shouldStartSignInWithValidateCode = !isUserClickedSignIn && !isSignedIn && (!!login || !!exitTo); + // If the magic link was previously expired (FAILED), we want to clear it so the magic code expired won't show briefly. + if (firstRenderRef.current) { + firstRenderRef.current = false; + if (autoAuthState === CONST.AUTO_AUTH_STATE.FAILED) { + Session.clearAutoAuthState(); + } + } + useEffect(() => { if (isUserClickedSignIn) { // The user clicked the option to sign in the current tab From 67d8b23424ee9e1b10e1314caf5ff33992c37995 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Thu, 12 Sep 2024 13:38:58 +0700 Subject: [PATCH 2/7] update comment --- src/pages/ValidateLoginPage/index.website.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/ValidateLoginPage/index.website.tsx b/src/pages/ValidateLoginPage/index.website.tsx index f86a32f3c551..a867d53bd203 100644 --- a/src/pages/ValidateLoginPage/index.website.tsx +++ b/src/pages/ValidateLoginPage/index.website.tsx @@ -28,7 +28,7 @@ function ValidateLoginPage({ const isUserClickedSignIn = !login && isSignedIn && (autoAuthState === CONST.AUTO_AUTH_STATE.SIGNING_IN || autoAuthState === CONST.AUTO_AUTH_STATE.JUST_SIGNED_IN); const shouldStartSignInWithValidateCode = !isUserClickedSignIn && !isSignedIn && (!!login || !!exitTo); - // If the magic link was previously expired (FAILED), we want to clear it so the magic code expired won't show briefly. + // If the magic link was previously expired (FAILED), we want to clear the failed state so the magic code expired won't show briefly. if (firstRenderRef.current) { firstRenderRef.current = false; if (autoAuthState === CONST.AUTO_AUTH_STATE.FAILED) { From 8462b926d09771b33f3b6050ee204e207620553d Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Thu, 12 Sep 2024 23:30:51 +0700 Subject: [PATCH 3/7] fix magic code expired is shown briefly --- src/pages/ValidateLoginPage/index.website.tsx | 38 +++++++++---------- src/pages/ValidateLoginPage/types.ts | 3 ++ 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/src/pages/ValidateLoginPage/index.website.tsx b/src/pages/ValidateLoginPage/index.website.tsx index a867d53bd203..3db0eabbe74f 100644 --- a/src/pages/ValidateLoginPage/index.website.tsx +++ b/src/pages/ValidateLoginPage/index.website.tsx @@ -1,4 +1,4 @@ -import React, {useEffect, useRef} from 'react'; +import React, {useEffect} from 'react'; import {withOnyx} from 'react-native-onyx'; import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; import ExpiredValidateCodeModal from '@components/ValidateCode/ExpiredValidateCodeModal'; @@ -18,24 +18,19 @@ function ValidateLoginPage({ params: {accountID, validateCode, exitTo}, }, session, + autoAuthState: autoAuthStateProp, }: ValidateLoginPageProps) { - const firstRenderRef = useRef(true); const login = credentials?.login; - const autoAuthState = session?.autoAuthState ?? CONST.AUTO_AUTH_STATE.NOT_STARTED; const isSignedIn = !!session?.authToken && session?.authTokenType !== CONST.AUTH_TOKEN_TYPES.ANONYMOUS; + // We don't want the previous autoAuthState affects the rendering of the current magic link page, so the autoAuthState prop sets initWithStoredValues as false, + // except if the user is signed in because the page will be remounted when successfully signed in as explained in Session.initAutoAuthState. + const autoAuthState = isSignedIn ? session?.autoAuthState : autoAuthStateProp; + const autoAuthStateWithDefault = autoAuthState ?? CONST.AUTO_AUTH_STATE.NOT_STARTED; const is2FARequired = !!account?.requiresTwoFactorAuth; const cachedAccountID = credentials?.accountID; - const isUserClickedSignIn = !login && isSignedIn && (autoAuthState === CONST.AUTO_AUTH_STATE.SIGNING_IN || autoAuthState === CONST.AUTO_AUTH_STATE.JUST_SIGNED_IN); + const isUserClickedSignIn = !login && isSignedIn && (autoAuthStateWithDefault === CONST.AUTO_AUTH_STATE.SIGNING_IN || autoAuthStateWithDefault === CONST.AUTO_AUTH_STATE.JUST_SIGNED_IN); const shouldStartSignInWithValidateCode = !isUserClickedSignIn && !isSignedIn && (!!login || !!exitTo); - // If the magic link was previously expired (FAILED), we want to clear the failed state so the magic code expired won't show briefly. - if (firstRenderRef.current) { - firstRenderRef.current = false; - if (autoAuthState === CONST.AUTO_AUTH_STATE.FAILED) { - Session.clearAutoAuthState(); - } - } - useEffect(() => { if (isUserClickedSignIn) { // The user clicked the option to sign in the current tab @@ -44,7 +39,7 @@ function ValidateLoginPage({ }); return; } - Session.initAutoAuthState(autoAuthState); + Session.initAutoAuthState(autoAuthStateWithDefault); if (!shouldStartSignInWithValidateCode) { if (exitTo) { @@ -59,7 +54,7 @@ function ValidateLoginPage({ // Since on Desktop we don't have multi-tab functionality to handle the login flow, // we need to `popToTop` the stack after `signInWithValidateCode` in order to // perform login for both 2FA and non-2FA accounts. - desktopLoginRedirect(autoAuthState, isSignedIn); + desktopLoginRedirect(autoAuthStateWithDefault, isSignedIn); // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps }, []); @@ -79,17 +74,17 @@ function ValidateLoginPage({ return ( <> - {autoAuthState === CONST.AUTO_AUTH_STATE.FAILED && } - {autoAuthState === CONST.AUTO_AUTH_STATE.JUST_SIGNED_IN && is2FARequired && !isSignedIn && login && } - {autoAuthState === CONST.AUTO_AUTH_STATE.JUST_SIGNED_IN && isSignedIn && !exitTo && login && } + {autoAuthStateWithDefault === CONST.AUTO_AUTH_STATE.FAILED && } + {autoAuthStateWithDefault === CONST.AUTO_AUTH_STATE.JUST_SIGNED_IN && is2FARequired && !isSignedIn && login && } + {autoAuthStateWithDefault === CONST.AUTO_AUTH_STATE.JUST_SIGNED_IN && isSignedIn && !exitTo && login && } {/* If session.autoAuthState isn't available yet, we use shouldStartSignInWithValidateCode to conditionally render the component instead of local autoAuthState which contains a default value of NOT_STARTED */} - {(!session?.autoAuthState ? !shouldStartSignInWithValidateCode : autoAuthState === CONST.AUTO_AUTH_STATE.NOT_STARTED) && !exitTo && ( + {(!autoAuthState ? !shouldStartSignInWithValidateCode : autoAuthStateWithDefault === CONST.AUTO_AUTH_STATE.NOT_STARTED) && !exitTo && ( )} - {(!session?.autoAuthState ? shouldStartSignInWithValidateCode : autoAuthState === CONST.AUTO_AUTH_STATE.SIGNING_IN) && } + {(!autoAuthState ? shouldStartSignInWithValidateCode : autoAuthStateWithDefault === CONST.AUTO_AUTH_STATE.SIGNING_IN) && } ); } @@ -100,4 +95,9 @@ export default withOnyx, Vali account: {key: ONYXKEYS.ACCOUNT}, credentials: {key: ONYXKEYS.CREDENTIALS}, session: {key: ONYXKEYS.SESSION}, + autoAuthState: { + key: ONYXKEYS.SESSION, + selector: (session) => session?.autoAuthState, + initWithStoredValues: false, + }, })(ValidateLoginPage); diff --git a/src/pages/ValidateLoginPage/types.ts b/src/pages/ValidateLoginPage/types.ts index d9d2873891cd..6ac32172ab3e 100644 --- a/src/pages/ValidateLoginPage/types.ts +++ b/src/pages/ValidateLoginPage/types.ts @@ -3,6 +3,7 @@ import type {OnyxEntry} from 'react-native-onyx'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import type SCREENS from '@src/SCREENS'; import type {Account, Credentials, Session} from '@src/types/onyx'; +import type {AutoAuthState} from '@src/types/onyx/Session'; type ValidateLoginPageOnyxNativeProps = { /** Session of currently logged in user */ @@ -15,6 +16,8 @@ type ValidateLoginPageOnyxProps = ValidateLoginPageOnyxNativeProps & { /** The credentials of the person logging in */ credentials: OnyxEntry; + + autoAuthState: OnyxEntry; }; type ValidateLoginPageProps = OnyxProps & StackScreenProps; From 9f02e303aa39a01427dbbd9fd0c18a8eaa83724a Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Thu, 12 Sep 2024 23:31:37 +0700 Subject: [PATCH 4/7] remove unnecessary function --- src/libs/actions/Session/index.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/libs/actions/Session/index.ts b/src/libs/actions/Session/index.ts index 3a9d92008809..ab209e9bf928 100644 --- a/src/libs/actions/Session/index.ts +++ b/src/libs/actions/Session/index.ts @@ -704,10 +704,6 @@ function initAutoAuthState(cachedAutoAuthState: AutoAuthState) { }); } -function clearAutoAuthState() { - Onyx.merge(ONYXKEYS.SESSION, {autoAuthState: null}); -} - function invalidateCredentials() { Onyx.merge(ONYXKEYS.CREDENTIALS, {autoGeneratedLogin: '', autoGeneratedPassword: ''}); } @@ -1123,7 +1119,6 @@ export { handleExitToNavigation, signInWithValidateCodeAndNavigate, initAutoAuthState, - clearAutoAuthState, signInWithShortLivedAuthToken, cleanupSession, signOut, From e2910019910325746897b3da6d04cbcadfe9cde4 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Wed, 18 Sep 2024 15:42:28 +0700 Subject: [PATCH 5/7] update comment --- src/pages/ValidateLoginPage/index.website.tsx | 4 ++-- src/pages/ValidateLoginPage/types.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/ValidateLoginPage/index.website.tsx b/src/pages/ValidateLoginPage/index.website.tsx index 3db0eabbe74f..e3280325c597 100644 --- a/src/pages/ValidateLoginPage/index.website.tsx +++ b/src/pages/ValidateLoginPage/index.website.tsx @@ -22,8 +22,8 @@ function ValidateLoginPage({ }: ValidateLoginPageProps) { const login = credentials?.login; const isSignedIn = !!session?.authToken && session?.authTokenType !== CONST.AUTH_TOKEN_TYPES.ANONYMOUS; - // We don't want the previous autoAuthState affects the rendering of the current magic link page, so the autoAuthState prop sets initWithStoredValues as false, - // except if the user is signed in because the page will be remounted when successfully signed in as explained in Session.initAutoAuthState. + // To ensure that the previous autoAuthState does not impact the rendering of the current magic link page, the autoAuthState prop sets initWithStoredValues to false. + // This is done unless the user is signed in, in which case the page will be remounted upon successful sign-in, as explained in Session.initAutoAuthState. const autoAuthState = isSignedIn ? session?.autoAuthState : autoAuthStateProp; const autoAuthStateWithDefault = autoAuthState ?? CONST.AUTO_AUTH_STATE.NOT_STARTED; const is2FARequired = !!account?.requiresTwoFactorAuth; diff --git a/src/pages/ValidateLoginPage/types.ts b/src/pages/ValidateLoginPage/types.ts index 6ac32172ab3e..e1bd29d27c9c 100644 --- a/src/pages/ValidateLoginPage/types.ts +++ b/src/pages/ValidateLoginPage/types.ts @@ -17,6 +17,7 @@ type ValidateLoginPageOnyxProps = ValidateLoginPageOnyxNativeProps & { /** The credentials of the person logging in */ credentials: OnyxEntry; + /** The auto authentication (magic link) status */ autoAuthState: OnyxEntry; }; From 0eba07a5d8337f59a97921158898a2082af10c67 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Wed, 2 Oct 2024 15:37:53 +0800 Subject: [PATCH 6/7] migrate to useOnyx --- src/pages/ValidateLoginPage/index.tsx | 13 +++++---- src/pages/ValidateLoginPage/index.website.tsx | 27 +++++++------------ src/pages/ValidateLoginPage/types.ts | 23 ++-------------- 3 files changed, 17 insertions(+), 46 deletions(-) diff --git a/src/pages/ValidateLoginPage/index.tsx b/src/pages/ValidateLoginPage/index.tsx index faf12194ca62..9f94c28f961a 100644 --- a/src/pages/ValidateLoginPage/index.tsx +++ b/src/pages/ValidateLoginPage/index.tsx @@ -1,18 +1,19 @@ import React, {useEffect} from 'react'; -import {withOnyx} from 'react-native-onyx'; +import {useOnyx} from 'react-native-onyx'; import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; import Navigation from '@libs/Navigation/Navigation'; import * as Session from '@userActions/Session'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; -import type {ValidateLoginPageOnyxNativeProps, ValidateLoginPageProps} from './types'; +import type {ValidateLoginPageProps} from './types'; function ValidateLoginPage({ route: { params: {accountID, validateCode, exitTo}, }, - session, -}: ValidateLoginPageProps) { +}: ValidateLoginPageProps) { + const [session] = useOnyx(ONYXKEYS.SESSION); + useEffect(() => { // Wait till navigation becomes available Navigation.isNavigationReady().then(() => { @@ -46,6 +47,4 @@ function ValidateLoginPage({ ValidateLoginPage.displayName = 'ValidateLoginPage'; -export default withOnyx, ValidateLoginPageOnyxNativeProps>({ - session: {key: ONYXKEYS.SESSION}, -})(ValidateLoginPage); +export default ValidateLoginPage; diff --git a/src/pages/ValidateLoginPage/index.website.tsx b/src/pages/ValidateLoginPage/index.website.tsx index e3280325c597..cda790811955 100644 --- a/src/pages/ValidateLoginPage/index.website.tsx +++ b/src/pages/ValidateLoginPage/index.website.tsx @@ -1,5 +1,5 @@ import React, {useEffect} from 'react'; -import {withOnyx} from 'react-native-onyx'; +import {useOnyx} from 'react-native-onyx'; import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; import ExpiredValidateCodeModal from '@components/ValidateCode/ExpiredValidateCodeModal'; import JustSignedInModal from '@components/ValidateCode/JustSignedInModal'; @@ -9,22 +9,22 @@ import Navigation from '@libs/Navigation/Navigation'; import * as Session from '@userActions/Session'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; -import type {ValidateLoginPageOnyxProps, ValidateLoginPageProps} from './types'; +import type {ValidateLoginPageProps} from './types'; function ValidateLoginPage({ - account, - credentials, route: { params: {accountID, validateCode, exitTo}, }, - session, - autoAuthState: autoAuthStateProp, -}: ValidateLoginPageProps) { +}: ValidateLoginPageProps) { + const [account] = useOnyx(ONYXKEYS.ACCOUNT); + const [credentials] = useOnyx(ONYXKEYS.CREDENTIALS); + const [session] = useOnyx(ONYXKEYS.SESSION); + const login = credentials?.login; const isSignedIn = !!session?.authToken && session?.authTokenType !== CONST.AUTH_TOKEN_TYPES.ANONYMOUS; // To ensure that the previous autoAuthState does not impact the rendering of the current magic link page, the autoAuthState prop sets initWithStoredValues to false. // This is done unless the user is signed in, in which case the page will be remounted upon successful sign-in, as explained in Session.initAutoAuthState. - const autoAuthState = isSignedIn ? session?.autoAuthState : autoAuthStateProp; + const [autoAuthState] = useOnyx(ONYXKEYS.SESSION, {initWithStoredValues: isSignedIn, selector: (session) => session?.autoAuthState}); const autoAuthStateWithDefault = autoAuthState ?? CONST.AUTO_AUTH_STATE.NOT_STARTED; const is2FARequired = !!account?.requiresTwoFactorAuth; const cachedAccountID = credentials?.accountID; @@ -91,13 +91,4 @@ function ValidateLoginPage({ ValidateLoginPage.displayName = 'ValidateLoginPage'; -export default withOnyx, ValidateLoginPageOnyxProps>({ - account: {key: ONYXKEYS.ACCOUNT}, - credentials: {key: ONYXKEYS.CREDENTIALS}, - session: {key: ONYXKEYS.SESSION}, - autoAuthState: { - key: ONYXKEYS.SESSION, - selector: (session) => session?.autoAuthState, - initWithStoredValues: false, - }, -})(ValidateLoginPage); +export default ValidateLoginPage; diff --git a/src/pages/ValidateLoginPage/types.ts b/src/pages/ValidateLoginPage/types.ts index e1bd29d27c9c..896f1660d685 100644 --- a/src/pages/ValidateLoginPage/types.ts +++ b/src/pages/ValidateLoginPage/types.ts @@ -1,26 +1,7 @@ import type {StackScreenProps} from '@react-navigation/stack'; -import type {OnyxEntry} from 'react-native-onyx'; import type {PublicScreensParamList} from '@libs/Navigation/types'; import type SCREENS from '@src/SCREENS'; -import type {Account, Credentials, Session} from '@src/types/onyx'; -import type {AutoAuthState} from '@src/types/onyx/Session'; -type ValidateLoginPageOnyxNativeProps = { - /** Session of currently logged in user */ - session: OnyxEntry; -}; +type ValidateLoginPageProps = StackScreenProps; -type ValidateLoginPageOnyxProps = ValidateLoginPageOnyxNativeProps & { - /** The details about the account that the user is signing in with */ - account: OnyxEntry; - - /** The credentials of the person logging in */ - credentials: OnyxEntry; - - /** The auto authentication (magic link) status */ - autoAuthState: OnyxEntry; -}; - -type ValidateLoginPageProps = OnyxProps & StackScreenProps; - -export type {ValidateLoginPageOnyxNativeProps, ValidateLoginPageOnyxProps, ValidateLoginPageProps}; +export type {ValidateLoginPageProps}; From a1138a7fc96e15171adc82c2b3949c9452b7315c Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Wed, 2 Oct 2024 15:41:38 +0800 Subject: [PATCH 7/7] lint --- src/pages/ValidateLoginPage/index.tsx | 2 +- src/pages/ValidateLoginPage/index.website.tsx | 4 ++-- src/pages/ValidateLoginPage/types.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/ValidateLoginPage/index.tsx b/src/pages/ValidateLoginPage/index.tsx index 9f94c28f961a..dc38916fdd10 100644 --- a/src/pages/ValidateLoginPage/index.tsx +++ b/src/pages/ValidateLoginPage/index.tsx @@ -5,7 +5,7 @@ import Navigation from '@libs/Navigation/Navigation'; import * as Session from '@userActions/Session'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; -import type {ValidateLoginPageProps} from './types'; +import type ValidateLoginPageProps from './types'; function ValidateLoginPage({ route: { diff --git a/src/pages/ValidateLoginPage/index.website.tsx b/src/pages/ValidateLoginPage/index.website.tsx index cda790811955..df7f2a9136a8 100644 --- a/src/pages/ValidateLoginPage/index.website.tsx +++ b/src/pages/ValidateLoginPage/index.website.tsx @@ -9,7 +9,7 @@ import Navigation from '@libs/Navigation/Navigation'; import * as Session from '@userActions/Session'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; -import type {ValidateLoginPageProps} from './types'; +import type ValidateLoginPageProps from './types'; function ValidateLoginPage({ route: { @@ -24,7 +24,7 @@ function ValidateLoginPage({ const isSignedIn = !!session?.authToken && session?.authTokenType !== CONST.AUTH_TOKEN_TYPES.ANONYMOUS; // To ensure that the previous autoAuthState does not impact the rendering of the current magic link page, the autoAuthState prop sets initWithStoredValues to false. // This is done unless the user is signed in, in which case the page will be remounted upon successful sign-in, as explained in Session.initAutoAuthState. - const [autoAuthState] = useOnyx(ONYXKEYS.SESSION, {initWithStoredValues: isSignedIn, selector: (session) => session?.autoAuthState}); + const [autoAuthState] = useOnyx(ONYXKEYS.SESSION, {initWithStoredValues: isSignedIn, selector: (sessionValue) => sessionValue?.autoAuthState}); const autoAuthStateWithDefault = autoAuthState ?? CONST.AUTO_AUTH_STATE.NOT_STARTED; const is2FARequired = !!account?.requiresTwoFactorAuth; const cachedAccountID = credentials?.accountID; diff --git a/src/pages/ValidateLoginPage/types.ts b/src/pages/ValidateLoginPage/types.ts index 896f1660d685..a42eec7131db 100644 --- a/src/pages/ValidateLoginPage/types.ts +++ b/src/pages/ValidateLoginPage/types.ts @@ -4,4 +4,4 @@ import type SCREENS from '@src/SCREENS'; type ValidateLoginPageProps = StackScreenProps; -export type {ValidateLoginPageProps}; +export default ValidateLoginPageProps;