diff --git a/contributingGuides/NAVIGATION.md b/contributingGuides/NAVIGATION.md index 8467b97c29fb..543b133fe62b 100644 --- a/contributingGuides/NAVIGATION.md +++ b/contributingGuides/NAVIGATION.md @@ -40,7 +40,17 @@ When creating RHP flows, you have to remember a couple things: An example of adding `Settings_Workspaces` page: -1. Add path to `ROUTES.ts`: https://github.com/Expensify/App/blob/main/src/ROUTES.ts +1. Add the page name to `SCREENS.ts` which will be reused throughout the app (linkingConfig, navigators, etc.): + +```ts +const SCREENS = { + SETTINGS: { + WORKSPACES: 'Settings_Workspaces', + }, +} as const; +``` + +2. Add path to `ROUTES.ts`: https://github.com/Expensify/App/blob/main/src/ROUTES.ts ```ts export const ROUTES = { @@ -55,11 +65,11 @@ export const ROUTES = { ``` -2. Add `Settings_Workspaces` page to proper RHP flow in `linkingConfig.ts`: https://github.com/Expensify/App/blob/3531af22dcadaa94ed11eccf370517dca0b8c305/src/libs/Navigation/linkingConfig.js#L40-L42 +3. Add `Settings_Workspaces` page to proper RHP flow in `linkingConfig.ts`: https://github.com/Expensify/App/blob/fbc11ca729ffa4676fb3bc8cd110ac3890debff6/src/libs/Navigation/linkingConfig.ts#L47-L50 -3. Add your page to proper navigator (it should be aligned with where you've put it in the previous step) https://github.com/Expensify/App/blob/3531af22dcadaa94ed11eccf370517dca0b8c305/src/libs/Navigation/AppNavigator/ModalStackNavigators.js#L334-L338 +4. Add your page to proper navigator (it should be aligned with where you've put it in the previous step) https://github.com/Expensify/App/blob/fbc11ca729ffa4676fb3bc8cd110ac3890debff6/src/libs/Navigation/AppNavigator/ModalStackNavigators.js#L141 -4. Make sure `HeaderWithBackButton` leads to the previous page in navigation flow of your page: https://github.com/Expensify/App/blob/3531af22dcadaa94ed11eccf370517dca0b8c305/src/pages/workspace/WorkspacesListPage.js#L186 +5. Make sure `HeaderWithBackButton` leads to the previous page in navigation flow of your page: https://github.com/Expensify/App/blob/3531af22dcadaa94ed11eccf370517dca0b8c305/src/pages/workspace/WorkspacesListPage.js#L186 ## Performance solutions diff --git a/src/SCREENS.ts b/src/SCREENS.ts index 38bd88a87158..921f57953482 100644 --- a/src/SCREENS.ts +++ b/src/SCREENS.ts @@ -19,53 +19,62 @@ const SCREENS = { UNLINK_LOGIN: 'UnlinkLogin', SETTINGS: { ROOT: 'Settings_Root', - PREFERENCES: 'Settings_Preferences', + SHARE_CODE: 'Settings_Share_Code', WORKSPACES: 'Settings_Workspaces', SECURITY: 'Settings_Security', - STATUS: 'Settings_Status', - PROFILE: 'Settings_Profile', - PRONOUNS: 'Settings_Pronouns', - DISPLAY_NAME: 'Settings_Display_Name', - TIMEZONE: 'Settings_Timezone', - TIMEZONE_SELECT: 'Settings_Timezone_Select', - CONTACT_METHODS: 'Settings_ContactMethods', - CONTACT_METHOD_DETAILS: 'Settings_ContactMethodDetails', - NEW_CONTACT_METHOD: 'Settings_NewContactMethod', - SHARE_CODE: 'Settings_Share_Code', ABOUT: 'Settings_About', APP_DOWNLOAD_LINKS: 'Settings_App_Download_Links', LOUNGE_ACCESS: 'Settings_Lounge_Access', - - PERSONAL_DETAILS_INITIAL: 'Settings_PersonalDetails_Initial', - PERSONAL_DETAILS_LEGAL_NAME: 'Settings_PersonalDetails_LegalName', - PERSONAL_DETAILS_DATE_OF_BIRTH: 'Settings_PersonalDetails_DateOfBirth', - PERSONAL_DETAILS_ADDRESS: 'Settings_PersonalDetails_Address', - PERSONAL_DETAILS_ADDRESS_COUNTRY: 'Settings_PersonalDetails_Address_Country', - - WALLET: 'Settings_Wallet', - WALLET_DOMAIN_CARD: 'Settings_Wallet_DomainCard', - WALLET_CARD_GET_PHYSICAL: { - NAME: 'Settings_Card_Get_Physical_Name', - PHONE: 'Settings_Card_Get_Physical_Phone', - ADDRESS: 'Settings_Card_Get_Physical_Address', - CONFIRM: 'Settings_Card_Get_Physical_Confirm', - }, - WALLET_TRANSFER_BALANCE: 'Settings_Wallet_Transfer_Balance', - WALLET_CHOOSE_TRANSFER_ACCOUNT: 'Settings_Wallet_Choose_Transfer_Account', - WALLET_ENABLE_PAYMENTS: 'Settings_Wallet_EnablePayments', - WALLET_CARD_ACTIVATE: 'Settings_Wallet_Card_Activate', - WALLET_REPORT_VIRTUAL_CARD_FRAUD: 'Settings_Wallet_ReportVirtualCardFraud', - WALLET_CARDS_DIGITAL_DETAILS_UPDATE_ADDRESS: 'Settings_Wallet_Cards_Digital_Details_Update_Address', - ADD_DEBIT_CARD: 'Settings_Add_Debit_Card', ADD_BANK_ACCOUNT: 'Settings_Add_Bank_Account', - PREFERENCES_PRIORITY_MODE: 'Settings_Preferences_PriorityMode', - PREFERENCES_LANGUAGE: 'Settings_Preferences_Language', - PREFERENCES_THEME: 'Settings_Preferences_Theme', CLOSE: 'Settings_Close', - STATUS_SET: 'Settings_Status_Set', TWO_FACTOR_AUTH: 'Settings_TwoFactorAuth', REPORT_CARD_LOST_OR_DAMAGED: 'Settings_ReportCardLostOrDamaged', + + PROFILE: { + ROOT: 'Settings_Profile', + DISPLAY_NAME: 'Settings_Display_Name', + CONTACT_METHODS: 'Settings_ContactMethods', + CONTACT_METHOD_DETAILS: 'Settings_ContactMethodDetails', + NEW_CONTACT_METHOD: 'Settings_NewContactMethod', + STATUS: 'Settings_Status', + STATUS_SET: 'Settings_Status_Set', + PRONOUNS: 'Settings_Pronouns', + TIMEZONE: 'Settings_Timezone', + TIMEZONE_SELECT: 'Settings_Timezone_Select', + + PERSONAL_DETAILS: { + INITIAL: 'Settings_PersonalDetails_Initial', + LEGAL_NAME: 'Settings_PersonalDetails_LegalName', + DATE_OF_BIRTH: 'Settings_PersonalDetails_DateOfBirth', + ADDRESS: 'Settings_PersonalDetails_Address', + ADDRESS_COUNTRY: 'Settings_PersonalDetails_Address_Country', + }, + }, + + PREFERENCES: { + ROOT: 'Settings_Preferences', + PRIORITY_MODE: 'Settings_Preferences_PriorityMode', + LANGUAGE: 'Settings_Preferences_Language', + THEME: 'Settings_Preferences_Theme', + }, + + WALLET: { + ROOT: 'Settings_Wallet', + DOMAIN_CARD: 'Settings_Wallet_DomainCard', + CARD_GET_PHYSICAL: { + NAME: 'Settings_Card_Get_Physical_Name', + PHONE: 'Settings_Card_Get_Physical_Phone', + ADDRESS: 'Settings_Card_Get_Physical_Address', + CONFIRM: 'Settings_Card_Get_Physical_Confirm', + }, + TRANSFER_BALANCE: 'Settings_Wallet_Transfer_Balance', + CHOOSE_TRANSFER_ACCOUNT: 'Settings_Wallet_Choose_Transfer_Account', + ENABLE_PAYMENTS: 'Settings_Wallet_EnablePayments', + CARD_ACTIVATE: 'Settings_Wallet_Card_Activate', + REPORT_VIRTUAL_CARD_FRAUD: 'Settings_Wallet_ReportVirtualCardFraud', + CARDS_DIGITAL_DETAILS_UPDATE_ADDRESS: 'Settings_Wallet_Cards_Digital_Details_Update_Address', + }, }, SAVE_THE_WORLD: { ROOT: 'SaveTheWorld_Root', @@ -102,6 +111,9 @@ const SCREENS = { SAML_SIGN_IN: 'SAMLSignIn', MONEY_REQUEST: { + MANUAL_TAB: 'manual', + SCAN_TAB: 'scan', + DISTANCE_TAB: 'distance', CREATE: 'Money_Request_Create', STEP_CONFIRMATION: 'Money_Request_Step_Confirmation', STEP_AMOUNT: 'Money_Request_Step_Amount', @@ -190,10 +202,21 @@ const SCREENS = { CURRENCY: 'EditRequest_Currency', }, + NEW_CHAT: { + ROOT: 'NewChat_Root', + NEW_CHAT: 'chat', + NEW_ROOM: 'room', + }, + + SPLIT_DETAILS: { + ROOT: 'SplitDetails_Root', + EDIT_REQUEST: 'SplitDetails_Edit_Request', + EDIT_CURRENCY: 'SplitDetails_Edit_Currency', + }, + I_KNOW_A_TEACHER: 'I_Know_A_Teacher', INTRO_SCHOOL_PRINCIPAL: 'Intro_School_Principal', I_AM_A_TEACHER: 'I_Am_A_Teacher', - ENABLE_PAYMENTS_ROOT: 'EnablePayments_Root', ADD_PERSONAL_BANK_ACCOUNT_ROOT: 'AddPersonalBankAccount_Root', REIMBURSEMENT_ACCOUNT_ROOT: 'Reimbursement_Account_Root', @@ -206,15 +229,7 @@ const SCREENS = { ROOM_MEMBERS_ROOT: 'RoomMembers_Root', ROOM_INVITE_ROOT: 'RoomInvite_Root', SEARCH_ROOT: 'Search_Root', - NEW_CHAT_ROOT: 'NewChat_Root', FLAG_COMMENT_ROOT: 'FlagComment_Root', - - SPLIT_DETAILS: { - ROOT: 'SplitDetails_Root', - EDIT_REQUEST: 'SplitDetails_Edit_Request', - EDIT_CURRENCY: 'SplitDetails_Edit_Currency', - }, - REIMBURSEMENT_ACCOUNT: 'ReimbursementAccount', GET_ASSISTANCE: 'GetAssistance', REFERRAL_DETAILS: 'Referral_Details', diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx index c6a58d7c29ad..29449f52ecd6 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx @@ -158,7 +158,7 @@ const SearchModalStackNavigator = createModalStackNavigator({ - [SCREENS.NEW_CHAT_ROOT]: () => require('../../../pages/NewChatSelectorPage').default as React.ComponentType, + [SCREENS.NEW_CHAT.ROOT]: () => require('../../../pages/NewChatSelectorPage').default as React.ComponentType, }); const NewTaskModalStackNavigator = createModalStackNavigator({ @@ -181,45 +181,45 @@ const SettingsModalStackNavigator = createModalStackNavigator require('../../../pages/settings/InitialSettingsPage').default as React.ComponentType, [SCREENS.SETTINGS.SHARE_CODE]: () => require('../../../pages/ShareCodePage').default as React.ComponentType, [SCREENS.SETTINGS.WORKSPACES]: () => require('../../../pages/workspace/WorkspacesListPage').default as React.ComponentType, - [SCREENS.SETTINGS.PROFILE]: () => require('../../../pages/settings/Profile/ProfilePage').default as React.ComponentType, - [SCREENS.SETTINGS.PRONOUNS]: () => require('../../../pages/settings/Profile/PronounsPage').default as React.ComponentType, - [SCREENS.SETTINGS.DISPLAY_NAME]: () => require('../../../pages/settings/Profile/DisplayNamePage').default as React.ComponentType, - [SCREENS.SETTINGS.TIMEZONE]: () => require('../../../pages/settings/Profile/TimezoneInitialPage').default as React.ComponentType, - [SCREENS.SETTINGS.TIMEZONE_SELECT]: () => require('../../../pages/settings/Profile/TimezoneSelectPage').default as React.ComponentType, - [SCREENS.SETTINGS.PERSONAL_DETAILS_INITIAL]: () => require('../../../pages/settings/Profile/PersonalDetails/PersonalDetailsInitialPage').default as React.ComponentType, - [SCREENS.SETTINGS.PERSONAL_DETAILS_LEGAL_NAME]: () => require('../../../pages/settings/Profile/PersonalDetails/LegalNamePage').default as React.ComponentType, - [SCREENS.SETTINGS.PERSONAL_DETAILS_DATE_OF_BIRTH]: () => require('../../../pages/settings/Profile/PersonalDetails/DateOfBirthPage').default as React.ComponentType, - [SCREENS.SETTINGS.PERSONAL_DETAILS_ADDRESS]: () => require('../../../pages/settings/Profile/PersonalDetails/AddressPage').default as React.ComponentType, - [SCREENS.SETTINGS.PERSONAL_DETAILS_ADDRESS_COUNTRY]: () => require('../../../pages/settings/Profile/PersonalDetails/CountrySelectionPage').default as React.ComponentType, - [SCREENS.SETTINGS.CONTACT_METHODS]: () => require('../../../pages/settings/Profile/Contacts/ContactMethodsPage').default as React.ComponentType, - [SCREENS.SETTINGS.CONTACT_METHOD_DETAILS]: () => require('../../../pages/settings/Profile/Contacts/ContactMethodDetailsPage').default as React.ComponentType, - [SCREENS.SETTINGS.NEW_CONTACT_METHOD]: () => require('../../../pages/settings/Profile/Contacts/NewContactMethodPage').default as React.ComponentType, - [SCREENS.SETTINGS.PREFERENCES]: () => require('../../../pages/settings/Preferences/PreferencesPage').default as React.ComponentType, - [SCREENS.SETTINGS.PREFERENCES_PRIORITY_MODE]: () => require('../../../pages/settings/Preferences/PriorityModePage').default as React.ComponentType, - [SCREENS.SETTINGS.PREFERENCES_LANGUAGE]: () => require('../../../pages/settings/Preferences/LanguagePage').default as React.ComponentType, + [SCREENS.SETTINGS.PROFILE.ROOT]: () => require('../../../pages/settings/Profile/ProfilePage').default as React.ComponentType, + [SCREENS.SETTINGS.PROFILE.PRONOUNS]: () => require('../../../pages/settings/Profile/PronounsPage').default as React.ComponentType, + [SCREENS.SETTINGS.PROFILE.DISPLAY_NAME]: () => require('../../../pages/settings/Profile/DisplayNamePage').default as React.ComponentType, + [SCREENS.SETTINGS.PROFILE.TIMEZONE]: () => require('../../../pages/settings/Profile/TimezoneInitialPage').default as React.ComponentType, + [SCREENS.SETTINGS.PROFILE.TIMEZONE_SELECT]: () => require('../../../pages/settings/Profile/TimezoneSelectPage').default as React.ComponentType, + [SCREENS.SETTINGS.PROFILE.PERSONAL_DETAILS.INITIAL]: () => require('../../../pages/settings/Profile/PersonalDetails/PersonalDetailsInitialPage').default as React.ComponentType, + [SCREENS.SETTINGS.PROFILE.PERSONAL_DETAILS.LEGAL_NAME]: () => require('../../../pages/settings/Profile/PersonalDetails/LegalNamePage').default as React.ComponentType, + [SCREENS.SETTINGS.PROFILE.PERSONAL_DETAILS.DATE_OF_BIRTH]: () => require('../../../pages/settings/Profile/PersonalDetails/DateOfBirthPage').default as React.ComponentType, + [SCREENS.SETTINGS.PROFILE.PERSONAL_DETAILS.ADDRESS]: () => require('../../../pages/settings/Profile/PersonalDetails/AddressPage').default as React.ComponentType, + [SCREENS.SETTINGS.PROFILE.PERSONAL_DETAILS.ADDRESS_COUNTRY]: () => require('../../../pages/settings/Profile/PersonalDetails/CountrySelectionPage').default as React.ComponentType, + [SCREENS.SETTINGS.PROFILE.CONTACT_METHODS]: () => require('../../../pages/settings/Profile/Contacts/ContactMethodsPage').default as React.ComponentType, + [SCREENS.SETTINGS.PROFILE.CONTACT_METHOD_DETAILS]: () => require('../../../pages/settings/Profile/Contacts/ContactMethodDetailsPage').default as React.ComponentType, + [SCREENS.SETTINGS.PROFILE.NEW_CONTACT_METHOD]: () => require('../../../pages/settings/Profile/Contacts/NewContactMethodPage').default as React.ComponentType, + [SCREENS.SETTINGS.PREFERENCES.ROOT]: () => require('../../../pages/settings/Preferences/PreferencesPage').default as React.ComponentType, + [SCREENS.SETTINGS.PREFERENCES.PRIORITY_MODE]: () => require('../../../pages/settings/Preferences/PriorityModePage').default as React.ComponentType, + [SCREENS.SETTINGS.PREFERENCES.LANGUAGE]: () => require('../../../pages/settings/Preferences/LanguagePage').default as React.ComponentType, // Will be uncommented as part of https://github.com/Expensify/App/issues/21670 - // [SCREENS.SETTINGS.PREFERENCES_THEME]: () => require('../../../pages/settings/Preferences/ThemePage').default as React.ComponentType, + // [SCREENS.SETTINGS.PREFERENCES.THEME]: () => require('../../../pages/settings/Preferences/ThemePage').default as React.ComponentType, [SCREENS.SETTINGS.CLOSE]: () => require('../../../pages/settings/Security/CloseAccountPage').default as React.ComponentType, [SCREENS.SETTINGS.SECURITY]: () => require('../../../pages/settings/Security/SecuritySettingsPage').default as React.ComponentType, [SCREENS.SETTINGS.ABOUT]: () => require('../../../pages/settings/AboutPage/AboutPage').default as React.ComponentType, [SCREENS.SETTINGS.APP_DOWNLOAD_LINKS]: () => require('../../../pages/settings/AppDownloadLinks').default as React.ComponentType, [SCREENS.SETTINGS.LOUNGE_ACCESS]: () => require('../../../pages/settings/Profile/LoungeAccessPage').default as React.ComponentType, - [SCREENS.SETTINGS.WALLET]: () => require('../../../pages/settings/Wallet/WalletPage').default as React.ComponentType, - [SCREENS.SETTINGS.WALLET_CARDS_DIGITAL_DETAILS_UPDATE_ADDRESS]: () => require('../../../pages/settings/Profile/PersonalDetails/AddressPage').default as React.ComponentType, - [SCREENS.SETTINGS.WALLET_DOMAIN_CARD]: () => require('../../../pages/settings/Wallet/ExpensifyCardPage').default as React.ComponentType, - [SCREENS.SETTINGS.WALLET_REPORT_VIRTUAL_CARD_FRAUD]: () => require('../../../pages/settings/Wallet/ReportVirtualCardFraudPage').default as React.ComponentType, - [SCREENS.SETTINGS.WALLET_CARD_ACTIVATE]: () => require('../../../pages/settings/Wallet/ActivatePhysicalCardPage').default as React.ComponentType, - [SCREENS.SETTINGS.WALLET_CARD_GET_PHYSICAL.NAME]: () => require('../../../pages/settings/Wallet/Card/GetPhysicalCardName').default as React.ComponentType, - [SCREENS.SETTINGS.WALLET_CARD_GET_PHYSICAL.PHONE]: () => require('../../../pages/settings/Wallet/Card/GetPhysicalCardPhone').default as React.ComponentType, - [SCREENS.SETTINGS.WALLET_CARD_GET_PHYSICAL.ADDRESS]: () => require('../../../pages/settings/Wallet/Card/GetPhysicalCardAddress').default as React.ComponentType, - [SCREENS.SETTINGS.WALLET_CARD_GET_PHYSICAL.CONFIRM]: () => require('../../../pages/settings/Wallet/Card/GetPhysicalCardConfirm').default as React.ComponentType, - [SCREENS.SETTINGS.WALLET_TRANSFER_BALANCE]: () => require('../../../pages/settings/Wallet/TransferBalancePage').default as React.ComponentType, - [SCREENS.SETTINGS.WALLET_CHOOSE_TRANSFER_ACCOUNT]: () => require('../../../pages/settings/Wallet/ChooseTransferAccountPage').default as React.ComponentType, - [SCREENS.SETTINGS.WALLET_ENABLE_PAYMENTS]: () => require('../../../pages/EnablePayments/EnablePaymentsPage').default as React.ComponentType, + [SCREENS.SETTINGS.WALLET.ROOT]: () => require('../../../pages/settings/Wallet/WalletPage').default as React.ComponentType, + [SCREENS.SETTINGS.WALLET.CARDS_DIGITAL_DETAILS_UPDATE_ADDRESS]: () => require('../../../pages/settings/Profile/PersonalDetails/AddressPage').default as React.ComponentType, + [SCREENS.SETTINGS.WALLET.DOMAIN_CARD]: () => require('../../../pages/settings/Wallet/ExpensifyCardPage').default as React.ComponentType, + [SCREENS.SETTINGS.WALLET.REPORT_VIRTUAL_CARD_FRAUD]: () => require('../../../pages/settings/Wallet/ReportVirtualCardFraudPage').default as React.ComponentType, + [SCREENS.SETTINGS.WALLET.CARD_ACTIVATE]: () => require('../../../pages/settings/Wallet/ActivatePhysicalCardPage').default as React.ComponentType, + [SCREENS.SETTINGS.WALLET.CARD_GET_PHYSICAL.NAME]: () => require('../../../pages/settings/Wallet/Card/GetPhysicalCardName').default as React.ComponentType, + [SCREENS.SETTINGS.WALLET.CARD_GET_PHYSICAL.PHONE]: () => require('../../../pages/settings/Wallet/Card/GetPhysicalCardPhone').default as React.ComponentType, + [SCREENS.SETTINGS.WALLET.CARD_GET_PHYSICAL.ADDRESS]: () => require('../../../pages/settings/Wallet/Card/GetPhysicalCardAddress').default as React.ComponentType, + [SCREENS.SETTINGS.WALLET.CARD_GET_PHYSICAL.CONFIRM]: () => require('../../../pages/settings/Wallet/Card/GetPhysicalCardConfirm').default as React.ComponentType, + [SCREENS.SETTINGS.WALLET.TRANSFER_BALANCE]: () => require('../../../pages/settings/Wallet/TransferBalancePage').default as React.ComponentType, + [SCREENS.SETTINGS.WALLET.CHOOSE_TRANSFER_ACCOUNT]: () => require('../../../pages/settings/Wallet/ChooseTransferAccountPage').default as React.ComponentType, + [SCREENS.SETTINGS.WALLET.ENABLE_PAYMENTS]: () => require('../../../pages/EnablePayments/EnablePaymentsPage').default as React.ComponentType, [SCREENS.SETTINGS.ADD_DEBIT_CARD]: () => require('../../../pages/settings/Wallet/AddDebitCardPage').default as React.ComponentType, [SCREENS.SETTINGS.ADD_BANK_ACCOUNT]: () => require('../../../pages/AddPersonalBankAccountPage').default as React.ComponentType, - [SCREENS.SETTINGS.STATUS]: () => require('../../../pages/settings/Profile/CustomStatus/StatusPage').default as React.ComponentType, - [SCREENS.SETTINGS.STATUS_SET]: () => require('../../../pages/settings/Profile/CustomStatus/StatusSetPage').default as React.ComponentType, + [SCREENS.SETTINGS.PROFILE.STATUS]: () => require('../../../pages/settings/Profile/CustomStatus/StatusPage').default as React.ComponentType, + [SCREENS.SETTINGS.PROFILE.STATUS_SET]: () => require('../../../pages/settings/Profile/CustomStatus/StatusSetPage').default as React.ComponentType, [SCREENS.WORKSPACE.INITIAL]: () => require('../../../pages/workspace/WorkspaceInitialPage').default as React.ComponentType, [SCREENS.WORKSPACE.SETTINGS]: () => require('../../../pages/workspace/WorkspaceSettingsPage').default as React.ComponentType, [SCREENS.WORKSPACE.CURRENCY]: () => require('../../../pages/workspace/WorkspaceSettingsCurrencyPage').default as React.ComponentType, diff --git a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx index 75358648be59..10b8129bc3e7 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx @@ -8,6 +8,7 @@ import RHPScreenOptions from '@libs/Navigation/AppNavigator/RHPScreenOptions'; import type {AuthScreensParamList, RightModalNavigatorParamList} from '@navigation/types'; import useThemeStyles from '@styles/useThemeStyles'; import NAVIGATORS from '@src/NAVIGATORS'; +import SCREENS from '@src/SCREENS'; import Overlay from './Overlay'; type RightModalNavigatorProps = StackScreenProps; @@ -25,99 +26,99 @@ function RightModalNavigator({navigation}: RightModalNavigatorProps) { diff --git a/src/libs/Navigation/linkingConfig.ts b/src/libs/Navigation/linkingConfig.ts index ca09c49de700..acbc7c8f1702 100644 --- a/src/libs/Navigation/linkingConfig.ts +++ b/src/libs/Navigation/linkingConfig.ts @@ -39,7 +39,7 @@ const linkingConfig: LinkingOptions = { [NAVIGATORS.RIGHT_MODAL_NAVIGATOR]: { screens: { - Settings: { + [SCREENS.RIGHT_MODAL.SETTINGS]: { screens: { [SCREENS.SETTINGS.ROOT]: { path: ROUTES.SETTINGS, @@ -48,23 +48,23 @@ const linkingConfig: LinkingOptions = { path: ROUTES.SETTINGS_WORKSPACES, exact: true, }, - [SCREENS.SETTINGS.PREFERENCES]: { + [SCREENS.SETTINGS.PREFERENCES.ROOT]: { path: ROUTES.SETTINGS_PREFERENCES, exact: true, }, - Settings_Preferences_PriorityMode: { + [SCREENS.SETTINGS.PREFERENCES.PRIORITY_MODE]: { path: ROUTES.SETTINGS_PRIORITY_MODE, exact: true, }, - Settings_Preferences_Language: { + [SCREENS.SETTINGS.PREFERENCES.LANGUAGE]: { path: ROUTES.SETTINGS_LANGUAGE, exact: true, }, - Settings_Preferences_Theme: { + [SCREENS.SETTINGS.PREFERENCES.THEME]: { path: ROUTES.SETTINGS_THEME, exact: true, }, - Settings_Close: { + [SCREENS.SETTINGS.CLOSE]: { path: ROUTES.SETTINGS_CLOSE, exact: true, }, @@ -72,237 +72,237 @@ const linkingConfig: LinkingOptions = { path: ROUTES.SETTINGS_SECURITY, exact: true, }, - Settings_Wallet: { + [SCREENS.SETTINGS.WALLET.ROOT]: { path: ROUTES.SETTINGS_WALLET, exact: true, }, - Settings_Wallet_DomainCard: { + [SCREENS.SETTINGS.WALLET.DOMAIN_CARD]: { path: ROUTES.SETTINGS_WALLET_DOMAINCARD.route, exact: true, }, - Settings_Wallet_ReportVirtualCardFraud: { + [SCREENS.SETTINGS.WALLET.REPORT_VIRTUAL_CARD_FRAUD]: { path: ROUTES.SETTINGS_REPORT_FRAUD.route, exact: true, }, - [SCREENS.SETTINGS.WALLET_CARD_GET_PHYSICAL.NAME]: { + [SCREENS.SETTINGS.WALLET.CARD_GET_PHYSICAL.NAME]: { path: ROUTES.SETTINGS_WALLET_CARD_GET_PHYSICAL_NAME.route, exact: true, }, - [SCREENS.SETTINGS.WALLET_CARD_GET_PHYSICAL.PHONE]: { + [SCREENS.SETTINGS.WALLET.CARD_GET_PHYSICAL.PHONE]: { path: ROUTES.SETTINGS_WALLET_CARD_GET_PHYSICAL_PHONE.route, exact: true, }, - [SCREENS.SETTINGS.WALLET_CARD_GET_PHYSICAL.ADDRESS]: { + [SCREENS.SETTINGS.WALLET.CARD_GET_PHYSICAL.ADDRESS]: { path: ROUTES.SETTINGS_WALLET_CARD_GET_PHYSICAL_ADDRESS.route, exact: true, }, - [SCREENS.SETTINGS.WALLET_CARD_GET_PHYSICAL.CONFIRM]: { + [SCREENS.SETTINGS.WALLET.CARD_GET_PHYSICAL.CONFIRM]: { path: ROUTES.SETTINGS_WALLET_CARD_GET_PHYSICAL_CONFIRM.route, exact: true, }, - Settings_Wallet_EnablePayments: { + [SCREENS.SETTINGS.WALLET.ENABLE_PAYMENTS]: { path: ROUTES.SETTINGS_ENABLE_PAYMENTS, exact: true, }, - Settings_Wallet_Transfer_Balance: { + [SCREENS.SETTINGS.WALLET.TRANSFER_BALANCE]: { path: ROUTES.SETTINGS_WALLET_TRANSFER_BALANCE, exact: true, }, - Settings_Wallet_Choose_Transfer_Account: { + [SCREENS.SETTINGS.WALLET.CHOOSE_TRANSFER_ACCOUNT]: { path: ROUTES.SETTINGS_WALLET_CHOOSE_TRANSFER_ACCOUNT, exact: true, }, - Settings_ReportCardLostOrDamaged: { + [SCREENS.SETTINGS.REPORT_CARD_LOST_OR_DAMAGED]: { path: ROUTES.SETTINGS_WALLET_REPORT_CARD_LOST_OR_DAMAGED.route, exact: true, }, - Settings_Wallet_Card_Activate: { + [SCREENS.SETTINGS.WALLET.CARD_ACTIVATE]: { path: ROUTES.SETTINGS_WALLET_CARD_ACTIVATE.route, exact: true, }, - Settings_Wallet_Cards_Digital_Details_Update_Address: { + [SCREENS.SETTINGS.WALLET.CARDS_DIGITAL_DETAILS_UPDATE_ADDRESS]: { path: ROUTES.SETTINGS_WALLET_CARD_DIGITAL_DETAILS_UPDATE_ADDRESS.route, exact: true, }, - Settings_Add_Debit_Card: { + [SCREENS.SETTINGS.ADD_DEBIT_CARD]: { path: ROUTES.SETTINGS_ADD_DEBIT_CARD, exact: true, }, - Settings_Add_Bank_Account: { + [SCREENS.SETTINGS.ADD_BANK_ACCOUNT]: { path: ROUTES.SETTINGS_ADD_BANK_ACCOUNT, exact: true, }, - Settings_Profile: { + [SCREENS.SETTINGS.PROFILE.ROOT]: { path: ROUTES.SETTINGS_PROFILE, exact: true, }, - Settings_Pronouns: { + [SCREENS.SETTINGS.PROFILE.PRONOUNS]: { path: ROUTES.SETTINGS_PRONOUNS, exact: true, }, - Settings_Display_Name: { + [SCREENS.SETTINGS.PROFILE.DISPLAY_NAME]: { path: ROUTES.SETTINGS_DISPLAY_NAME, exact: true, }, - Settings_Timezone: { + [SCREENS.SETTINGS.PROFILE.TIMEZONE]: { path: ROUTES.SETTINGS_TIMEZONE, exact: true, }, - Settings_Timezone_Select: { + [SCREENS.SETTINGS.PROFILE.TIMEZONE_SELECT]: { path: ROUTES.SETTINGS_TIMEZONE_SELECT, exact: true, }, - Settings_About: { + [SCREENS.SETTINGS.ABOUT]: { path: ROUTES.SETTINGS_ABOUT, exact: true, }, - Settings_App_Download_Links: { + [SCREENS.SETTINGS.APP_DOWNLOAD_LINKS]: { path: ROUTES.SETTINGS_APP_DOWNLOAD_LINKS, exact: true, }, - Settings_ContactMethods: { + [SCREENS.SETTINGS.PROFILE.CONTACT_METHODS]: { path: ROUTES.SETTINGS_CONTACT_METHODS.route, exact: true, }, - Settings_ContactMethodDetails: { + [SCREENS.SETTINGS.PROFILE.CONTACT_METHOD_DETAILS]: { path: ROUTES.SETTINGS_CONTACT_METHOD_DETAILS.route, }, - Settings_Lounge_Access: { + [SCREENS.SETTINGS.LOUNGE_ACCESS]: { path: ROUTES.SETTINGS_LOUNGE_ACCESS, }, - Settings_NewContactMethod: { + [SCREENS.SETTINGS.PROFILE.NEW_CONTACT_METHOD]: { path: ROUTES.SETTINGS_NEW_CONTACT_METHOD.route, exact: true, }, - Settings_PersonalDetails_Initial: { + [SCREENS.SETTINGS.PROFILE.PERSONAL_DETAILS.INITIAL]: { path: ROUTES.SETTINGS_PERSONAL_DETAILS, exact: true, }, - Settings_PersonalDetails_LegalName: { + [SCREENS.SETTINGS.PROFILE.PERSONAL_DETAILS.LEGAL_NAME]: { path: ROUTES.SETTINGS_PERSONAL_DETAILS_LEGAL_NAME, exact: true, }, - Settings_PersonalDetails_DateOfBirth: { + [SCREENS.SETTINGS.PROFILE.PERSONAL_DETAILS.DATE_OF_BIRTH]: { path: ROUTES.SETTINGS_PERSONAL_DETAILS_DATE_OF_BIRTH, exact: true, }, - Settings_PersonalDetails_Address: { + [SCREENS.SETTINGS.PROFILE.PERSONAL_DETAILS.ADDRESS]: { path: ROUTES.SETTINGS_PERSONAL_DETAILS_ADDRESS, exact: true, }, - Settings_PersonalDetails_Address_Country: { + [SCREENS.SETTINGS.PROFILE.PERSONAL_DETAILS.ADDRESS_COUNTRY]: { path: ROUTES.SETTINGS_PERSONAL_DETAILS_ADDRESS_COUNTRY.route, exact: true, }, - Settings_TwoFactorAuth: { + [SCREENS.SETTINGS.TWO_FACTOR_AUTH]: { path: ROUTES.SETTINGS_2FA.route, exact: true, }, - Settings_Share_Code: { + [SCREENS.SETTINGS.SHARE_CODE]: { path: ROUTES.SETTINGS_SHARE_CODE, exact: true, }, - [SCREENS.SETTINGS.STATUS]: { + [SCREENS.SETTINGS.PROFILE.STATUS]: { path: ROUTES.SETTINGS_STATUS, exact: true, }, - Settings_Status_Set: { + [SCREENS.SETTINGS.PROFILE.STATUS_SET]: { path: ROUTES.SETTINGS_STATUS_SET, exact: true, }, - Workspace_Initial: { + [SCREENS.WORKSPACE.INITIAL]: { path: ROUTES.WORKSPACE_INITIAL.route, }, - Workspace_Settings: { + [SCREENS.WORKSPACE.SETTINGS]: { path: ROUTES.WORKSPACE_SETTINGS.route, }, - Workspace_Settings_Currency: { + [SCREENS.WORKSPACE.CURRENCY]: { path: ROUTES.WORKSPACE_SETTINGS_CURRENCY.route, }, - Workspace_Card: { + [SCREENS.WORKSPACE.CARD]: { path: ROUTES.WORKSPACE_CARD.route, }, - Workspace_Reimburse: { + [SCREENS.WORKSPACE.REIMBURSE]: { path: ROUTES.WORKSPACE_REIMBURSE.route, }, - Workspace_RateAndUnit: { + [SCREENS.WORKSPACE.RATE_AND_UNIT]: { path: ROUTES.WORKSPACE_RATE_AND_UNIT.route, }, - Workspace_Bills: { + [SCREENS.WORKSPACE.BILLS]: { path: ROUTES.WORKSPACE_BILLS.route, }, - Workspace_Invoices: { + [SCREENS.WORKSPACE.INVOICES]: { path: ROUTES.WORKSPACE_INVOICES.route, }, - Workspace_Travel: { + [SCREENS.WORKSPACE.TRAVEL]: { path: ROUTES.WORKSPACE_TRAVEL.route, }, - Workspace_Members: { + [SCREENS.WORKSPACE.MEMBERS]: { path: ROUTES.WORKSPACE_MEMBERS.route, }, - Workspace_Invite: { + [SCREENS.WORKSPACE.INVITE]: { path: ROUTES.WORKSPACE_INVITE.route, }, - Workspace_Invite_Message: { + [SCREENS.WORKSPACE.INVITE_MESSAGE]: { path: ROUTES.WORKSPACE_INVITE_MESSAGE.route, }, - ReimbursementAccount: { + [SCREENS.REIMBURSEMENT_ACCOUNT]: { path: ROUTES.BANK_ACCOUNT_WITH_STEP_TO_OPEN.route, exact: true, }, - GetAssistance: { + [SCREENS.GET_ASSISTANCE]: { path: ROUTES.GET_ASSISTANCE.route, }, - KeyboardShortcuts: { + [SCREENS.KEYBOARD_SHORTCUTS]: { path: ROUTES.KEYBOARD_SHORTCUTS, }, }, }, - Private_Notes: { + [SCREENS.RIGHT_MODAL.PRIVATE_NOTES]: { screens: { - PrivateNotes_View: ROUTES.PRIVATE_NOTES_VIEW.route, - PrivateNotes_List: ROUTES.PRIVATE_NOTES_LIST.route, - PrivateNotes_Edit: ROUTES.PRIVATE_NOTES_EDIT.route, + [SCREENS.PRIVATE_NOTES.VIEW]: ROUTES.PRIVATE_NOTES_VIEW.route, + [SCREENS.PRIVATE_NOTES.LIST]: ROUTES.PRIVATE_NOTES_LIST.route, + [SCREENS.PRIVATE_NOTES.EDIT]: ROUTES.PRIVATE_NOTES_EDIT.route, }, }, - Report_Details: { + [SCREENS.RIGHT_MODAL.REPORT_DETAILS]: { screens: { - Report_Details_Root: ROUTES.REPORT_WITH_ID_DETAILS.route, - Report_Details_Share_Code: ROUTES.REPORT_WITH_ID_DETAILS_SHARE_CODE.route, + [SCREENS.REPORT_DETAILS.ROOT]: ROUTES.REPORT_WITH_ID_DETAILS.route, + [SCREENS.REPORT_DETAILS.SHARE_CODE]: ROUTES.REPORT_WITH_ID_DETAILS_SHARE_CODE.route, }, }, - Report_Settings: { + [SCREENS.RIGHT_MODAL.REPORT_SETTINGS]: { screens: { - Report_Settings_Root: { + [SCREENS.REPORT_SETTINGS.ROOT]: { path: ROUTES.REPORT_SETTINGS.route, }, - Report_Settings_Room_Name: { + [SCREENS.REPORT_SETTINGS.ROOM_NAME]: { path: ROUTES.REPORT_SETTINGS_ROOM_NAME.route, }, - Report_Settings_Notification_Preferences: { + [SCREENS.REPORT_SETTINGS.NOTIFICATION_PREFERENCES]: { path: ROUTES.REPORT_SETTINGS_NOTIFICATION_PREFERENCES.route, }, - Report_Settings_Write_Capability: { + [SCREENS.REPORT_SETTINGS.WRITE_CAPABILITY]: { path: ROUTES.REPORT_SETTINGS_WRITE_CAPABILITY.route, }, }, }, - Report_WelcomeMessage: { + [SCREENS.RIGHT_MODAL.REPORT_WELCOME_MESSAGE]: { screens: { - Report_WelcomeMessage_Root: ROUTES.REPORT_WELCOME_MESSAGE.route, + [SCREENS.REPORT_WELCOME_MESSAGE_ROOT]: ROUTES.REPORT_WELCOME_MESSAGE.route, }, }, - NewChat: { + [SCREENS.RIGHT_MODAL.NEW_CHAT]: { screens: { - NewChat_Root: { + [SCREENS.NEW_CHAT.ROOT]: { path: ROUTES.NEW, exact: true, screens: { - chat: { + [SCREENS.NEW_CHAT.NEW_CHAT]: { path: ROUTES.NEW_CHAT, exact: true, }, - room: { + [SCREENS.NEW_CHAT.NEW_ROOM]: { path: ROUTES.NEW_ROOM, exact: true, }, @@ -310,57 +310,57 @@ const linkingConfig: LinkingOptions = { }, }, }, - NewTask: { + [SCREENS.RIGHT_MODAL.NEW_TASK]: { screens: { - NewTask_Root: ROUTES.NEW_TASK, - NewTask_TaskAssigneeSelector: ROUTES.NEW_TASK_ASSIGNEE, - NewTask_TaskShareDestinationSelector: ROUTES.NEW_TASK_SHARE_DESTINATION, - NewTask_Details: ROUTES.NEW_TASK_DETAILS, - NewTask_Title: ROUTES.NEW_TASK_TITLE, - NewTask_Description: ROUTES.NEW_TASK_DESCRIPTION, + [SCREENS.NEW_TASK.ROOT]: ROUTES.NEW_TASK, + [SCREENS.NEW_TASK.TASK_ASSIGNEE_SELECTOR]: ROUTES.NEW_TASK_ASSIGNEE, + [SCREENS.NEW_TASK.TASK_SHARE_DESTINATION_SELECTOR]: ROUTES.NEW_TASK_SHARE_DESTINATION, + [SCREENS.NEW_TASK.DETAILS]: ROUTES.NEW_TASK_DETAILS, + [SCREENS.NEW_TASK.TITLE]: ROUTES.NEW_TASK_TITLE, + [SCREENS.NEW_TASK.DESCRIPTION]: ROUTES.NEW_TASK_DESCRIPTION, }, }, - TeachersUnite: { + [SCREENS.RIGHT_MODAL.TEACHERS_UNITE]: { screens: { [SCREENS.SAVE_THE_WORLD.ROOT]: ROUTES.TEACHERS_UNITE, - I_Know_A_Teacher: ROUTES.I_KNOW_A_TEACHER, - Intro_School_Principal: ROUTES.INTRO_SCHOOL_PRINCIPAL, - I_Am_A_Teacher: ROUTES.I_AM_A_TEACHER, + [SCREENS.I_KNOW_A_TEACHER]: ROUTES.I_KNOW_A_TEACHER, + [SCREENS.INTRO_SCHOOL_PRINCIPAL]: ROUTES.INTRO_SCHOOL_PRINCIPAL, + [SCREENS.I_AM_A_TEACHER]: ROUTES.I_AM_A_TEACHER, }, }, - Search: { + [SCREENS.RIGHT_MODAL.SEARCH]: { screens: { - Search_Root: ROUTES.SEARCH, + [SCREENS.SEARCH_ROOT]: ROUTES.SEARCH, }, }, - Details: { + [SCREENS.RIGHT_MODAL.DETAILS]: { screens: { - Details_Root: ROUTES.DETAILS.route, + [SCREENS.DETAILS_ROOT]: ROUTES.DETAILS.route, }, }, - Profile: { + [SCREENS.RIGHT_MODAL.PROFILE]: { screens: { - Profile_Root: ROUTES.PROFILE.route, + [SCREENS.PROFILE_ROOT]: ROUTES.PROFILE.route, }, }, - Participants: { + [SCREENS.RIGHT_MODAL.PARTICIPANTS]: { screens: { - ReportParticipants_Root: ROUTES.REPORT_PARTICIPANTS.route, + [SCREENS.REPORT_PARTICIPANTS_ROOT]: ROUTES.REPORT_PARTICIPANTS.route, }, }, - RoomInvite: { + [SCREENS.RIGHT_MODAL.ROOM_INVITE]: { screens: { - RoomInvite_Root: ROUTES.ROOM_INVITE.route, + [SCREENS.ROOM_INVITE_ROOT]: ROUTES.ROOM_INVITE.route, }, }, - RoomMembers: { + [SCREENS.RIGHT_MODAL.ROOM_MEMBERS]: { screens: { - RoomMembers_Root: ROUTES.ROOM_MEMBERS.route, + [SCREENS.ROOM_MEMBERS_ROOT]: ROUTES.ROOM_MEMBERS.route, }, }, - MoneyRequest: { + [SCREENS.RIGHT_MODAL.MONEY_REQUEST]: { screens: { - Money_Request_Create: { + [SCREENS.MONEY_REQUEST.CREATE]: { path: ROUTES.MONEY_REQUEST_CREATE.route, exact: true, screens: { @@ -378,102 +378,102 @@ const linkingConfig: LinkingOptions = { }, }, }, - Money_Request_Step_Amount: ROUTES.MONEY_REQUEST_STEP_AMOUNT.route, - Money_Request_Step_Category: ROUTES.MONEY_REQUEST_STEP_CATEGORY.route, - Money_Request_Step_Confirmation: ROUTES.MONEY_REQUEST_STEP_CONFIRMATION.route, - Money_Request_Step_Currency: ROUTES.MONEY_REQUEST_STEP_CURRENCY.route, - Money_Request_Step_Date: ROUTES.MONEY_REQUEST_STEP_DATE.route, - Money_Request_Step_Description: ROUTES.MONEY_REQUEST_STEP_DESCRIPTION.route, - Money_Request_Step_Distance: ROUTES.MONEY_REQUEST_STEP_DISTANCE.route, - Money_Request_Step_Merchant: ROUTES.MONEY_REQUEST_STEP_MERCHANT.route, - Money_Request_Step_Participants: ROUTES.MONEY_REQUEST_STEP_PARTICIPANTS.route, - Money_Request_Step_Scan: ROUTES.MONEY_REQUEST_STEP_SCAN.route, - Money_Request_Step_Tag: ROUTES.MONEY_REQUEST_STEP_TAG.route, - Money_Request_Step_Waypoint: ROUTES.MONEY_REQUEST_STEP_WAYPOINT.route, - Money_Request: { + [SCREENS.MONEY_REQUEST.STEP_AMOUNT]: ROUTES.MONEY_REQUEST_STEP_AMOUNT.route, + [SCREENS.MONEY_REQUEST.STEP_CATEGORY]: ROUTES.MONEY_REQUEST_STEP_CATEGORY.route, + [SCREENS.MONEY_REQUEST.STEP_CONFIRMATION]: ROUTES.MONEY_REQUEST_STEP_CONFIRMATION.route, + [SCREENS.MONEY_REQUEST.STEP_CURRENCY]: ROUTES.MONEY_REQUEST_STEP_CURRENCY.route, + [SCREENS.MONEY_REQUEST.STEP_DATE]: ROUTES.MONEY_REQUEST_STEP_DATE.route, + [SCREENS.MONEY_REQUEST.STEP_DESCRIPTION]: ROUTES.MONEY_REQUEST_STEP_DESCRIPTION.route, + [SCREENS.MONEY_REQUEST.STEP_DISTANCE]: ROUTES.MONEY_REQUEST_STEP_DISTANCE.route, + [SCREENS.MONEY_REQUEST.STEP_MERCHANT]: ROUTES.MONEY_REQUEST_STEP_MERCHANT.route, + [SCREENS.MONEY_REQUEST.STEP_PARTICIPANTS]: ROUTES.MONEY_REQUEST_STEP_PARTICIPANTS.route, + [SCREENS.MONEY_REQUEST.STEP_SCAN]: ROUTES.MONEY_REQUEST_STEP_SCAN.route, + [SCREENS.MONEY_REQUEST.STEP_TAG]: ROUTES.MONEY_REQUEST_STEP_TAG.route, + [SCREENS.MONEY_REQUEST.STEP_WAYPOINT]: ROUTES.MONEY_REQUEST_STEP_WAYPOINT.route, + [SCREENS.MONEY_REQUEST.ROOT]: { path: ROUTES.MONEY_REQUEST.route, exact: true, screens: { - manual: { + [SCREENS.MONEY_REQUEST.MANUAL_TAB]: { path: ROUTES.MONEY_REQUEST_MANUAL_TAB, exact: true, }, - scan: { + [SCREENS.MONEY_REQUEST.SCAN_TAB]: { path: ROUTES.MONEY_REQUEST_SCAN_TAB, exact: true, }, - distance: { + [SCREENS.MONEY_REQUEST.DISTANCE_TAB]: { path: ROUTES.MONEY_REQUEST_DISTANCE_TAB.route, exact: true, }, }, }, - Money_Request_Amount: ROUTES.MONEY_REQUEST_AMOUNT.route, - Money_Request_Participants: ROUTES.MONEY_REQUEST_PARTICIPANTS.route, - Money_Request_Confirmation: ROUTES.MONEY_REQUEST_CONFIRMATION.route, - Money_Request_Date: ROUTES.MONEY_REQUEST_DATE.route, - Money_Request_Currency: ROUTES.MONEY_REQUEST_CURRENCY.route, - Money_Request_Description: ROUTES.MONEY_REQUEST_DESCRIPTION.route, - Money_Request_Category: ROUTES.MONEY_REQUEST_CATEGORY.route, - Money_Request_Tag: ROUTES.MONEY_REQUEST_TAG.route, - Money_Request_Merchant: ROUTES.MONEY_REQUEST_MERCHANT.route, - Money_Request_Waypoint: ROUTES.MONEY_REQUEST_WAYPOINT.route, - Money_Request_Edit_Waypoint: ROUTES.MONEY_REQUEST_EDIT_WAYPOINT.route, - Money_Request_Receipt: ROUTES.MONEY_REQUEST_RECEIPT.route, - Money_Request_Distance: ROUTES.MONEY_REQUEST_DISTANCE.route, - IOU_Send_Enable_Payments: ROUTES.IOU_SEND_ENABLE_PAYMENTS, - IOU_Send_Add_Bank_Account: ROUTES.IOU_SEND_ADD_BANK_ACCOUNT, - IOU_Send_Add_Debit_Card: ROUTES.IOU_SEND_ADD_DEBIT_CARD, + [SCREENS.MONEY_REQUEST.AMOUNT]: ROUTES.MONEY_REQUEST_AMOUNT.route, + [SCREENS.MONEY_REQUEST.PARTICIPANTS]: ROUTES.MONEY_REQUEST_PARTICIPANTS.route, + [SCREENS.MONEY_REQUEST.CONFIRMATION]: ROUTES.MONEY_REQUEST_CONFIRMATION.route, + [SCREENS.MONEY_REQUEST.DATE]: ROUTES.MONEY_REQUEST_DATE.route, + [SCREENS.MONEY_REQUEST.CURRENCY]: ROUTES.MONEY_REQUEST_CURRENCY.route, + [SCREENS.MONEY_REQUEST.DESCRIPTION]: ROUTES.MONEY_REQUEST_DESCRIPTION.route, + [SCREENS.MONEY_REQUEST.CATEGORY]: ROUTES.MONEY_REQUEST_CATEGORY.route, + [SCREENS.MONEY_REQUEST.TAG]: ROUTES.MONEY_REQUEST_TAG.route, + [SCREENS.MONEY_REQUEST.MERCHANT]: ROUTES.MONEY_REQUEST_MERCHANT.route, + [SCREENS.MONEY_REQUEST.WAYPOINT]: ROUTES.MONEY_REQUEST_WAYPOINT.route, + [SCREENS.MONEY_REQUEST.EDIT_WAYPOINT]: ROUTES.MONEY_REQUEST_EDIT_WAYPOINT.route, + [SCREENS.MONEY_REQUEST.RECEIPT]: ROUTES.MONEY_REQUEST_RECEIPT.route, + [SCREENS.MONEY_REQUEST.DISTANCE]: ROUTES.MONEY_REQUEST_DISTANCE.route, + [SCREENS.IOU_SEND.ENABLE_PAYMENTS]: ROUTES.IOU_SEND_ENABLE_PAYMENTS, + [SCREENS.IOU_SEND.ADD_BANK_ACCOUNT]: ROUTES.IOU_SEND_ADD_BANK_ACCOUNT, + [SCREENS.IOU_SEND.ADD_DEBIT_CARD]: ROUTES.IOU_SEND_ADD_DEBIT_CARD, }, }, - SplitDetails: { + [SCREENS.RIGHT_MODAL.SPLIT_DETAILS]: { screens: { - SplitDetails_Root: ROUTES.SPLIT_BILL_DETAILS.route, - SplitDetails_Edit_Request: ROUTES.EDIT_SPLIT_BILL.route, - SplitDetails_Edit_Currency: ROUTES.EDIT_SPLIT_BILL_CURRENCY.route, + [SCREENS.SPLIT_DETAILS.ROOT]: ROUTES.SPLIT_BILL_DETAILS.route, + [SCREENS.SPLIT_DETAILS.EDIT_REQUEST]: ROUTES.EDIT_SPLIT_BILL.route, + [SCREENS.SPLIT_DETAILS.EDIT_CURRENCY]: ROUTES.EDIT_SPLIT_BILL_CURRENCY.route, }, }, - Task_Details: { + [SCREENS.RIGHT_MODAL.TASK_DETAILS]: { screens: { - Task_Title: ROUTES.TASK_TITLE.route, - Task_Description: ROUTES.TASK_DESCRIPTION.route, - Task_Assignee: ROUTES.TASK_ASSIGNEE.route, + [SCREENS.TASK.TITLE]: ROUTES.TASK_TITLE.route, + [SCREENS.TASK.DESCRIPTION]: ROUTES.TASK_DESCRIPTION.route, + [SCREENS.TASK.ASSIGNEE]: ROUTES.TASK_ASSIGNEE.route, }, }, - AddPersonalBankAccount: { + [SCREENS.RIGHT_MODAL.ADD_PERSONAL_BANK_ACCOUNT]: { screens: { - AddPersonalBankAccount_Root: ROUTES.BANK_ACCOUNT_PERSONAL, + [SCREENS.ADD_PERSONAL_BANK_ACCOUNT_ROOT]: ROUTES.BANK_ACCOUNT_PERSONAL, }, }, - EnablePayments: { + [SCREENS.RIGHT_MODAL.ENABLE_PAYMENTS]: { screens: { - EnablePayments_Root: ROUTES.ENABLE_PAYMENTS, + [SCREENS.ENABLE_PAYMENTS_ROOT]: ROUTES.ENABLE_PAYMENTS, }, }, - Wallet_Statement: { + [SCREENS.RIGHT_MODAL.WALLET_STATEMENT]: { screens: { - WalletStatement_Root: ROUTES.WALLET_STATEMENT_WITH_DATE, + [SCREENS.WALLET_STATEMENT_ROOT]: ROUTES.WALLET_STATEMENT_WITH_DATE, }, }, - Flag_Comment: { + [SCREENS.RIGHT_MODAL.FLAG_COMMENT]: { screens: { - FlagComment_Root: ROUTES.FLAG_COMMENT.route, + [SCREENS.FLAG_COMMENT_ROOT]: ROUTES.FLAG_COMMENT.route, }, }, - EditRequest: { + [SCREENS.RIGHT_MODAL.EDIT_REQUEST]: { screens: { - EditRequest_Root: ROUTES.EDIT_REQUEST.route, - EditRequest_Currency: ROUTES.EDIT_CURRENCY_REQUEST.route, + [SCREENS.EDIT_REQUEST.ROOT]: ROUTES.EDIT_REQUEST.route, + [SCREENS.EDIT_REQUEST.CURRENCY]: ROUTES.EDIT_CURRENCY_REQUEST.route, }, }, - SignIn: { + [SCREENS.RIGHT_MODAL.SIGN_IN]: { screens: { - SignIn_Root: ROUTES.SIGN_IN_MODAL, + [SCREENS.SIGN_IN_ROOT]: ROUTES.SIGN_IN_MODAL, }, }, - Referral: { + [SCREENS.RIGHT_MODAL.REFERRAL]: { screens: { - Referral_Details: ROUTES.REFERRAL_DETAILS_MODAL.route, + [SCREENS.REFERRAL_DETAILS]: ROUTES.REFERRAL_DETAILS_MODAL.route, }, }, }, diff --git a/src/libs/Navigation/types.ts b/src/libs/Navigation/types.ts index 7aa5bb32a4e4..b69552f6fe0f 100644 --- a/src/libs/Navigation/types.ts +++ b/src/libs/Navigation/types.ts @@ -45,44 +45,44 @@ type SettingsNavigatorParamList = { [SCREENS.SETTINGS.ROOT]: undefined; [SCREENS.SETTINGS.SHARE_CODE]: undefined; [SCREENS.SETTINGS.WORKSPACES]: undefined; - [SCREENS.SETTINGS.PROFILE]: undefined; - [SCREENS.SETTINGS.PRONOUNS]: undefined; - [SCREENS.SETTINGS.DISPLAY_NAME]: undefined; - [SCREENS.SETTINGS.TIMEZONE]: undefined; - [SCREENS.SETTINGS.TIMEZONE_SELECT]: undefined; - [SCREENS.SETTINGS.PERSONAL_DETAILS_INITIAL]: undefined; - [SCREENS.SETTINGS.PERSONAL_DETAILS_LEGAL_NAME]: undefined; - [SCREENS.SETTINGS.PERSONAL_DETAILS_DATE_OF_BIRTH]: undefined; - [SCREENS.SETTINGS.PERSONAL_DETAILS_ADDRESS]: undefined; - [SCREENS.SETTINGS.PERSONAL_DETAILS_ADDRESS_COUNTRY]: undefined; - [SCREENS.SETTINGS.CONTACT_METHODS]: undefined; - [SCREENS.SETTINGS.CONTACT_METHOD_DETAILS]: undefined; - [SCREENS.SETTINGS.NEW_CONTACT_METHOD]: undefined; - [SCREENS.SETTINGS.PREFERENCES]: undefined; - [SCREENS.SETTINGS.PREFERENCES_PRIORITY_MODE]: undefined; - [SCREENS.SETTINGS.PREFERENCES_LANGUAGE]: undefined; - [SCREENS.SETTINGS.PREFERENCES_THEME]: undefined; + [SCREENS.SETTINGS.PROFILE.ROOT]: undefined; + [SCREENS.SETTINGS.PROFILE.PRONOUNS]: undefined; + [SCREENS.SETTINGS.PROFILE.DISPLAY_NAME]: undefined; + [SCREENS.SETTINGS.PROFILE.TIMEZONE]: undefined; + [SCREENS.SETTINGS.PROFILE.TIMEZONE_SELECT]: undefined; + [SCREENS.SETTINGS.PROFILE.PERSONAL_DETAILS.INITIAL]: undefined; + [SCREENS.SETTINGS.PROFILE.PERSONAL_DETAILS.LEGAL_NAME]: undefined; + [SCREENS.SETTINGS.PROFILE.PERSONAL_DETAILS.DATE_OF_BIRTH]: undefined; + [SCREENS.SETTINGS.PROFILE.PERSONAL_DETAILS.ADDRESS]: undefined; + [SCREENS.SETTINGS.PROFILE.PERSONAL_DETAILS.ADDRESS_COUNTRY]: undefined; + [SCREENS.SETTINGS.PROFILE.CONTACT_METHODS]: undefined; + [SCREENS.SETTINGS.PROFILE.CONTACT_METHOD_DETAILS]: undefined; + [SCREENS.SETTINGS.PROFILE.NEW_CONTACT_METHOD]: undefined; + [SCREENS.SETTINGS.PREFERENCES.ROOT]: undefined; + [SCREENS.SETTINGS.PREFERENCES.PRIORITY_MODE]: undefined; + [SCREENS.SETTINGS.PREFERENCES.LANGUAGE]: undefined; + [SCREENS.SETTINGS.PREFERENCES.THEME]: undefined; [SCREENS.SETTINGS.CLOSE]: undefined; [SCREENS.SETTINGS.SECURITY]: undefined; [SCREENS.SETTINGS.ABOUT]: undefined; [SCREENS.SETTINGS.APP_DOWNLOAD_LINKS]: undefined; [SCREENS.SETTINGS.LOUNGE_ACCESS]: undefined; - [SCREENS.SETTINGS.WALLET]: undefined; - [SCREENS.SETTINGS.WALLET_CARDS_DIGITAL_DETAILS_UPDATE_ADDRESS]: undefined; - [SCREENS.SETTINGS.WALLET_DOMAIN_CARD]: undefined; - [SCREENS.SETTINGS.WALLET_REPORT_VIRTUAL_CARD_FRAUD]: undefined; - [SCREENS.SETTINGS.WALLET_CARD_ACTIVATE]: undefined; - [SCREENS.SETTINGS.WALLET_CARD_GET_PHYSICAL.NAME]: undefined; - [SCREENS.SETTINGS.WALLET_CARD_GET_PHYSICAL.PHONE]: undefined; - [SCREENS.SETTINGS.WALLET_CARD_GET_PHYSICAL.ADDRESS]: undefined; - [SCREENS.SETTINGS.WALLET_CARD_GET_PHYSICAL.CONFIRM]: undefined; - [SCREENS.SETTINGS.WALLET_TRANSFER_BALANCE]: undefined; - [SCREENS.SETTINGS.WALLET_CHOOSE_TRANSFER_ACCOUNT]: undefined; - [SCREENS.SETTINGS.WALLET_ENABLE_PAYMENTS]: undefined; + [SCREENS.SETTINGS.WALLET.ROOT]: undefined; + [SCREENS.SETTINGS.WALLET.CARDS_DIGITAL_DETAILS_UPDATE_ADDRESS]: undefined; + [SCREENS.SETTINGS.WALLET.DOMAIN_CARD]: undefined; + [SCREENS.SETTINGS.WALLET.REPORT_VIRTUAL_CARD_FRAUD]: undefined; + [SCREENS.SETTINGS.WALLET.CARD_ACTIVATE]: undefined; + [SCREENS.SETTINGS.WALLET.CARD_GET_PHYSICAL.NAME]: undefined; + [SCREENS.SETTINGS.WALLET.CARD_GET_PHYSICAL.PHONE]: undefined; + [SCREENS.SETTINGS.WALLET.CARD_GET_PHYSICAL.ADDRESS]: undefined; + [SCREENS.SETTINGS.WALLET.CARD_GET_PHYSICAL.CONFIRM]: undefined; + [SCREENS.SETTINGS.WALLET.TRANSFER_BALANCE]: undefined; + [SCREENS.SETTINGS.WALLET.CHOOSE_TRANSFER_ACCOUNT]: undefined; + [SCREENS.SETTINGS.WALLET.ENABLE_PAYMENTS]: undefined; [SCREENS.SETTINGS.ADD_DEBIT_CARD]: undefined; [SCREENS.SETTINGS.ADD_BANK_ACCOUNT]: undefined; - [SCREENS.SETTINGS.STATUS]: undefined; - [SCREENS.SETTINGS.STATUS_SET]: undefined; + [SCREENS.SETTINGS.PROFILE.STATUS]: undefined; + [SCREENS.SETTINGS.PROFILE.STATUS_SET]: undefined; [SCREENS.WORKSPACE.INITIAL]: undefined; [SCREENS.WORKSPACE.SETTINGS]: undefined; [SCREENS.WORKSPACE.CURRENCY]: undefined; @@ -124,7 +124,7 @@ type SettingsNavigatorParamList = { }; type NewChatNavigatorParamList = { - [SCREENS.NEW_CHAT_ROOT]: undefined; + [SCREENS.NEW_CHAT.ROOT]: undefined; }; type SearchNavigatorParamList = { diff --git a/src/libs/actions/Welcome.ts b/src/libs/actions/Welcome.ts index 7fd7adeafa96..02109804efb9 100644 --- a/src/libs/actions/Welcome.ts +++ b/src/libs/actions/Welcome.ts @@ -119,7 +119,7 @@ function show({routes, showCreateMenu = () => {}, showPopoverMenu = () => false} // If we are rendering the SidebarScreen at the same time as a workspace route that means we've already created a workspace via workspace/new and should not open the global // create menu right now. We should also stay on the workspace page if that is our destination. const topRoute = routes.length > 0 ? routes[routes.length - 1] : undefined; - const isWorkspaceRoute = topRoute !== undefined && topRoute.name === 'Settings' && topRoute.params?.path.includes('workspace'); + const isWorkspaceRoute = topRoute !== undefined && topRoute.name === SCREENS.RIGHT_MODAL.SETTINGS && topRoute.params?.path.includes('workspace'); const transitionRoute = routes.find((route) => route.name === SCREENS.TRANSITION_BETWEEN_APPS); const exitingToWorkspaceRoute = transitionRoute?.params?.exitTo === 'workspace/new'; const openOnAdminRoom = topRoute?.params?.openOnAdminRoom ?? false; diff --git a/src/pages/settings/Preferences/PreferencesPage.js b/src/pages/settings/Preferences/PreferencesPage.js index b010c3790056..6fa3e2df3474 100755 --- a/src/pages/settings/Preferences/PreferencesPage.js +++ b/src/pages/settings/Preferences/PreferencesPage.js @@ -46,7 +46,7 @@ function PreferencesPage(props) { Navigation.goBack(ROUTES.SETTINGS)} - backgroundColor={theme.PAGE_THEMES[SCREENS.SETTINGS.PREFERENCES].backgroundColor} + backgroundColor={theme.PAGE_THEMES[SCREENS.SETTINGS.PREFERENCES.ROOT].backgroundColor} illustration={LottieAnimations.PreferencesDJ} > diff --git a/src/pages/settings/Profile/CustomStatus/StatusPage.js b/src/pages/settings/Profile/CustomStatus/StatusPage.js index 6850684cfda2..226d0fed8044 100644 --- a/src/pages/settings/Profile/CustomStatus/StatusPage.js +++ b/src/pages/settings/Profile/CustomStatus/StatusPage.js @@ -91,7 +91,7 @@ function StatusPage({draftStatus, currentUserPersonalDetails}) { /> } headerContainerStyles={[styles.staticHeaderImage]} - backgroundColor={theme.PAGE_THEMES[SCREENS.SETTINGS.STATUS].backgroundColor} + backgroundColor={theme.PAGE_THEMES[SCREENS.SETTINGS.PROFILE.STATUS].backgroundColor} footer={footerComponent} > diff --git a/src/pages/settings/Wallet/ActivatePhysicalCardPage.js b/src/pages/settings/Wallet/ActivatePhysicalCardPage.js index e45b4ad67f4e..788c571d9e7d 100644 --- a/src/pages/settings/Wallet/ActivatePhysicalCardPage.js +++ b/src/pages/settings/Wallet/ActivatePhysicalCardPage.js @@ -134,7 +134,7 @@ function ActivatePhysicalCardPage({ Navigation.navigate(ROUTES.SETTINGS_WALLET_DOMAINCARD.getRoute(domain))} - backgroundColor={theme.PAGE_THEMES[SCREENS.SETTINGS.PREFERENCES].backgroundColor} + backgroundColor={theme.PAGE_THEMES[SCREENS.SETTINGS.PREFERENCES.ROOT].backgroundColor} illustration={LottieAnimations.Magician} scrollViewContainerStyles={[styles.mnh100]} childrenContainerStyles={[styles.flex1]} diff --git a/src/pages/settings/Wallet/WalletEmptyState.js b/src/pages/settings/Wallet/WalletEmptyState.js index f2235dfafef2..f4609bdc8534 100644 --- a/src/pages/settings/Wallet/WalletEmptyState.js +++ b/src/pages/settings/Wallet/WalletEmptyState.js @@ -36,7 +36,7 @@ function WalletEmptyState({onAddPaymentMethod}) { const {translate} = useLocalize(); return ( Navigation.goBack(ROUTES.SETTINGS)} title={translate('common.wallet')} diff --git a/src/styles/themes/default.ts b/src/styles/themes/default.ts index 891eb1e9bf8e..2edb660cff65 100644 --- a/src/styles/themes/default.ts +++ b/src/styles/themes/default.ts @@ -103,7 +103,7 @@ const darkTheme = { backgroundColor: colors.tangerine800, statusBarStyle: CONST.STATUS_BAR_STYLE.LIGHT_CONTENT, }, - [SCREENS.SETTINGS.PREFERENCES]: { + [SCREENS.SETTINGS.PREFERENCES.ROOT]: { backgroundColor: colors.blue500, statusBarStyle: CONST.STATUS_BAR_STYLE.LIGHT_CONTENT, }, @@ -111,7 +111,7 @@ const darkTheme = { backgroundColor: colors.pink800, statusBarStyle: CONST.STATUS_BAR_STYLE.LIGHT_CONTENT, }, - [SCREENS.SETTINGS.WALLET]: { + [SCREENS.SETTINGS.WALLET.ROOT]: { backgroundColor: colors.productDark100, statusBarStyle: CONST.STATUS_BAR_STYLE.LIGHT_CONTENT, }, @@ -119,7 +119,7 @@ const darkTheme = { backgroundColor: colors.ice500, statusBarStyle: CONST.STATUS_BAR_STYLE.DARK_CONTENT, }, - [SCREENS.SETTINGS.STATUS]: { + [SCREENS.SETTINGS.PROFILE.STATUS]: { backgroundColor: colors.green700, statusBarStyle: CONST.STATUS_BAR_STYLE.LIGHT_CONTENT, }, diff --git a/src/styles/themes/light.ts b/src/styles/themes/light.ts index b3f71dec8ac2..0e4ca1c8a879 100644 --- a/src/styles/themes/light.ts +++ b/src/styles/themes/light.ts @@ -103,7 +103,7 @@ const lightTheme = { backgroundColor: colors.tangerine800, statusBarStyle: CONST.STATUS_BAR_STYLE.LIGHT_CONTENT, }, - [SCREENS.SETTINGS.PREFERENCES]: { + [SCREENS.SETTINGS.PREFERENCES.ROOT]: { backgroundColor: colors.blue500, statusBarStyle: CONST.STATUS_BAR_STYLE.LIGHT_CONTENT, }, @@ -111,7 +111,7 @@ const lightTheme = { backgroundColor: colors.pink800, statusBarStyle: CONST.STATUS_BAR_STYLE.LIGHT_CONTENT, }, - [SCREENS.SETTINGS.WALLET]: { + [SCREENS.SETTINGS.WALLET.ROOT]: { backgroundColor: colors.productDark100, statusBarStyle: CONST.STATUS_BAR_STYLE.LIGHT_CONTENT, }, @@ -119,7 +119,7 @@ const lightTheme = { backgroundColor: colors.ice500, statusBarStyle: CONST.STATUS_BAR_STYLE.DARK_CONTENT, }, - [SCREENS.SETTINGS.STATUS]: { + [SCREENS.SETTINGS.PROFILE.STATUS]: { backgroundColor: colors.green700, statusBarStyle: CONST.STATUS_BAR_STYLE.LIGHT_CONTENT, },