Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Switch to Expensify Classic Button down #50029

Merged
merged 3 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,6 @@ const translations = {
phrase3: 'and',
phrase4: 'Privacy',
},
returnToClassic: 'Switch to Expensify Classic',
help: 'Help',
accountSettings: 'Account settings',
account: 'Account',
Expand Down
1 change: 0 additions & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,6 @@ const translations = {
phrase3: 'y',
phrase4: 'Privacidad',
},
returnToClassic: 'Volver a Expensify Clásico',
help: 'Ayuda',
accountSettings: 'Configuración de la cuenta',
account: 'Cuenta',
Expand Down
32 changes: 16 additions & 16 deletions src/pages/settings/InitialSettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,20 +131,6 @@ function InitialSettingsPage({currentUserPersonalDetails}: InitialSettingsPagePr
sectionStyle: styles.accountSettingsSectionContainer,
sectionTranslationKey: 'initialSettingsPage.account',
items: [
{
translationKey: 'exitSurvey.goToExpensifyClassic',
icon: Expensicons.ExpensifyLogoNew,
...(NativeModules.HybridAppModule
? {
action: () => {
NativeModules.HybridAppModule.closeReactNativeApp(false, true);
setInitialURL(undefined);
},
}
: {
routeName: ROUTES.SETTINGS_EXIT_SURVEY_REASON,
}),
},
{
translationKey: 'common.profile',
icon: Expensicons.Profile,
Expand Down Expand Up @@ -174,7 +160,7 @@ function InitialSettingsPage({currentUserPersonalDetails}: InitialSettingsPagePr
};

return defaultMenu;
}, [loginList, fundList, styles.accountSettingsSectionContainer, bankAccountList, userWallet?.errors, walletTerms?.errors, setInitialURL]);
}, [loginList, fundList, styles.accountSettingsSectionContainer, bankAccountList, userWallet?.errors, walletTerms?.errors]);

/**
* Retuns a list of menu items data for workspace section
Expand Down Expand Up @@ -240,6 +226,20 @@ function InitialSettingsPage({currentUserPersonalDetails}: InitialSettingsPagePr
shouldShowRightIcon: true,
link: CONST.NEWHELP_URL,
},
{
translationKey: 'exitSurvey.goToExpensifyClassic',
icon: Expensicons.ExpensifyLogoNew,
...(NativeModules.HybridAppModule
? {
action: () => {
NativeModules.HybridAppModule.closeReactNativeApp(false, true);
setInitialURL(undefined);
},
}
: {
routeName: ROUTES.SETTINGS_EXIT_SURVEY_REASON,
}),
},
{
translationKey: 'initialSettingsPage.about',
icon: Expensicons.Info,
Expand All @@ -264,7 +264,7 @@ function InitialSettingsPage({currentUserPersonalDetails}: InitialSettingsPagePr
},
],
};
}, [styles.pt4, signOut]);
}, [styles.pt4, signOut, setInitialURL]);

/**
* Retuns JSX.Element with menu items
Expand Down
Loading