Skip to content

Commit 5fcf9ad

Browse files
committed
fix lint & prettier
1 parent 4d0ac15 commit 5fcf9ad

File tree

8 files changed

+16
-33
lines changed

8 files changed

+16
-33
lines changed

src/App.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,6 @@ import './setup/backgroundTask';
4747
import './setup/hybridApp';
4848
import {SplashScreenStateContextProvider} from './SplashScreenStateContext';
4949

50-
/**
51-
* Properties passed to the top-level React Native component by HybridApp.
52-
* These will always be `undefined` in "pure" NewDot builds.
53-
*/
54-
type AppProps = {
55-
};
56-
5750
LogBox.ignoreLogs([
5851
// Basically it means that if the app goes in the background and back to foreground on Android,
5952
// the timer is lost. Currently Expensify is using a 30 minutes interval to refresh personal details.
@@ -67,15 +60,15 @@ const fill = {flex: 1};
6760

6861
const StrictModeWrapper = CONFIG.USE_REACT_STRICT_MODE_IN_DEV ? React.StrictMode : ({children}: {children: React.ReactElement}) => children;
6962

70-
function App({}: AppProps) {
63+
function App() {
7164
useDefaultDragAndDrop();
7265
OnyxUpdateManager();
7366

7467
return (
7568
<StrictModeWrapper>
7669
<SplashScreenStateContextProvider>
7770
<InitialURLContextProvider>
78-
<HybridAppHandler/>
71+
<HybridAppHandler />
7972
<GestureHandlerRootView style={fill}>
8073
<SafeAreaProvider
8174
initialMetrics={{
@@ -134,5 +127,3 @@ function App({}: AppProps) {
134127
App.displayName = 'App';
135128

136129
export default App;
137-
138-
export type {AppProps};

src/HybridAppHandler.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import HybridAppModule from '@expensify/react-native-hybrid-app/src/index.native';
22
import {useContext, useEffect} from 'react';
3-
import {useOnyx} from 'react-native-onyx';
43
import CONFIG from './CONFIG';
54
import CONST from './CONST';
5+
import useOnyx from './hooks/useOnyx';
66
import {parseHybridAppSettings} from './libs/actions/HybridApp';
77
import {setupNewDotAfterTransitionFromOldDot} from './libs/actions/Session';
88
import Log from './libs/Log';

src/components/InitialURLContextProvider.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React, {createContext, useEffect, useMemo, useState} from 'react';
22
import type {ReactNode} from 'react';
33
import {Linking} from 'react-native';
4-
import type {AppProps} from '@src/App';
54
import type {Route} from '@src/ROUTES';
65

76
type InitialUrlContextType = {
@@ -15,7 +14,7 @@ const InitialURLContext = createContext<InitialUrlContextType>({
1514
setInitialURL: () => {},
1615
});
1716

18-
type InitialURLContextProviderProps = AppProps & {
17+
type InitialURLContextProviderProps = {
1918
/** Children passed to the context provider */
2019
children: ReactNode;
2120
};

src/libs/HybridApp.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,13 @@ function shouldUseOldApp(tryNewDot?: TryNewDot) {
6565
return tryNewDot?.classicRedirect?.dismissed === true;
6666
}
6767

68-
function handleChangeInHybridAppSignInFlow(hybridApp: OnyxEntry<HybridApp>, tryNewDot: OnyxEntry<TryNewDot>, credentials: OnyxEntry<Credentials>, session: OnyxEntry<Session>, usingSignInModal = false) {
68+
function handleChangeInHybridAppSignInFlow(
69+
hybridApp: OnyxEntry<HybridApp>,
70+
tryNewDot: OnyxEntry<TryNewDot>,
71+
credentials: OnyxEntry<Credentials>,
72+
session: OnyxEntry<Session>,
73+
usingSignInModal = false,
74+
) {
6975
if (!CONFIG.IS_HYBRID_APP) {
7076
return;
7177
}

src/libs/Navigation/AppNavigator/index.native.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, {memo, useMemo} from 'react';
2-
import {useOnyx} from 'react-native-onyx';
2+
import useOnyx from '@hooks/useOnyx';
33
import CONFIG from '@src/CONFIG';
44
import ONYXKEYS from '@src/ONYXKEYS';
55
import type ReactComponentModule from '@src/types/utils/ReactComponentModule';

src/pages/OnboardingAccounting/BaseOnboardingAccounting.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ import {waitForIdle} from '@libs/Network/SequentialQueue';
3333
import {shouldOnboardingRedirectToOldDot} from '@libs/OnboardingUtils';
3434
import {isPaidGroupPolicy, isPolicyAdmin} from '@libs/PolicyUtils';
3535
import variables from '@styles/variables';
36+
import {closeReactNativeApp} from '@userActions/HybridApp';
3637
import CONFIG from '@src/CONFIG';
3738
import type {OnboardingAccounting} from '@src/CONST';
3839
import CONST from '@src/CONST';
3940
import type {TranslationPaths} from '@src/languages/types';
4041
import ONYXKEYS from '@src/ONYXKEYS';
4142
import ROUTES from '@src/ROUTES';
42-
import {closeReactNativeApp} from '@userActions/HybridApp';
4343
import type {BaseOnboardingAccountingProps} from './types';
4444

4545
type Integration = {

src/pages/signin/ChooseSSOOrMagicCode.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import {useFocusEffect} from '@react-navigation/native';
22
import React, {useCallback} from 'react';
33
import {Keyboard, View} from 'react-native';
4-
import {useOnyx} from 'react-native-onyx';
54
import Button from '@components/Button';
65
import FormHelpMessage from '@components/FormHelpMessage';
76
import Text from '@components/Text';
87
import useKeyboardState from '@hooks/useKeyboardState';
98
import useLocalize from '@hooks/useLocalize';
109
import useNetwork from '@hooks/useNetwork';
10+
import useOnyx from '@hooks/useOnyx';
1111
import useResponsiveLayout from '@hooks/useResponsiveLayout';
1212
import useThemeStyles from '@hooks/useThemeStyles';
1313
import {getLatestErrorMessage} from '@libs/ErrorUtils';

src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.tsx

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ import {getLatestErrorMessage} from '@libs/ErrorUtils';
2424
import {isValidRecoveryCode, isValidTwoFactorCode, isValidValidateCode} from '@libs/ValidationUtils';
2525
import ChangeExpensifyLoginLink from '@pages/signin/ChangeExpensifyLoginLink';
2626
import Terms from '@pages/signin/Terms';
27-
import {resetSignInFlow} from '@userActions/HybridApp';
28-
import {clearAccountMessages, isAnonymousUser as isAnonymousUserUtil, clearSignInData as sessionActionsClearSignInData, signIn, signInWithValidateCode} from '@userActions/Session';
27+
import {clearAccountMessages, clearSignInData as sessionActionsClearSignInData, signIn, signInWithValidateCode} from '@userActions/Session';
2928
import {resendValidateCode as userActionsResendValidateCode} from '@userActions/User';
30-
import CONFIG from '@src/CONFIG';
3129
import CONST from '@src/CONST';
3230
import type {TranslationPaths} from '@src/languages/types';
3331
import ONYXKEYS from '@src/ONYXKEYS';
@@ -293,18 +291,7 @@ function BaseValidateCodeForm({autoComplete, isUsingRecoveryCode, setIsUsingReco
293291
} else {
294292
signIn(validateCode, recoveryCodeOr2faCode);
295293
}
296-
}, [
297-
account?.isLoading,
298-
account?.errors,
299-
account?.requiresTwoFactorAuth,
300-
hybridApp?.readyToShowAuthScreens,
301-
session,
302-
isUsingRecoveryCode,
303-
recoveryCode,
304-
twoFactorAuthCode,
305-
credentials?.accountID,
306-
validateCode,
307-
]);
294+
}, [account?.isLoading, account?.errors, account?.requiresTwoFactorAuth, isUsingRecoveryCode, recoveryCode, twoFactorAuthCode, credentials?.accountID, validateCode]);
308295

309296
return (
310297
<SafariFormWrapper>

0 commit comments

Comments
 (0)