From cd19f31b5c57dbc2be79c88d731f8bda696fc54b Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Fri, 3 May 2024 22:35:58 +0700 Subject: [PATCH 01/10] update onboarding flow --- .../BaseOnboardingPersonalDetails.tsx | 10 +--------- src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx | 2 +- src/pages/OnboardingWork/BaseOnboardingWork.tsx | 10 +++++++++- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx b/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx index 9fdb78c91feb..af76313a00e9 100644 --- a/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx +++ b/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx @@ -28,8 +28,6 @@ import ROUTES from '@src/ROUTES'; import INPUT_IDS from '@src/types/form/DisplayNameForm'; import type {BaseOnboardingPersonalDetailsOnyxProps, BaseOnboardingPersonalDetailsProps} from './types'; -const OPEN_WORK_PAGE_PURPOSES = [CONST.ONBOARDING_CHOICES.MANAGE_TEAM]; - function BaseOnboardingPersonalDetails({currentUserPersonalDetails, shouldUseNativeStyles, onboardingPurposeSelected}: BaseOnboardingPersonalDetailsProps) { const styles = useThemeStyles(); const {translate} = useLocalize(); @@ -51,12 +49,6 @@ function BaseOnboardingPersonalDetails({currentUserPersonalDetails, shouldUseNat return; } - if (OPEN_WORK_PAGE_PURPOSES.includes(onboardingPurposeSelected)) { - Navigation.navigate(ROUTES.ONBOARDING_WORK); - - return; - } - Report.completeOnboarding(onboardingPurposeSelected, CONST.ONBOARDING_MESSAGES[onboardingPurposeSelected], { login: currentUserPersonalDetails.login ?? '', firstName, @@ -121,7 +113,7 @@ function BaseOnboardingPersonalDetails({currentUserPersonalDetails, shouldUseNat { diff --git a/src/pages/OnboardingWork/BaseOnboardingWork.tsx b/src/pages/OnboardingWork/BaseOnboardingWork.tsx index 151c1bb35ea2..c15e40ac0301 100644 --- a/src/pages/OnboardingWork/BaseOnboardingWork.tsx +++ b/src/pages/OnboardingWork/BaseOnboardingWork.tsx @@ -27,6 +27,8 @@ import ROUTES from '@src/ROUTES'; import INPUT_IDS from '@src/types/form/WorkForm'; import type {BaseOnboardingWorkOnyxProps, BaseOnboardingWorkProps} from './types'; +const OPEN_WORK_PAGE_PURPOSES = [CONST.ONBOARDING_CHOICES.MANAGE_TEAM]; + function BaseOnboardingWork({currentUserPersonalDetails, shouldUseNativeStyles, onboardingPurposeSelected}: BaseOnboardingWorkProps) { const styles = useThemeStyles(); const {translate} = useLocalize(); @@ -41,6 +43,12 @@ function BaseOnboardingWork({currentUserPersonalDetails, shouldUseNativeStyles, return; } + if (OPEN_WORK_PAGE_PURPOSES.includes(onboardingPurposeSelected)) { + Navigation.navigate(ROUTES.ONBOARDING_PERSONAL_DETAILS); + + return; + } + const work = values.work.trim(); const {adminsChatReportID} = Policy.createWorkspace(undefined, true, work); @@ -96,7 +104,7 @@ function BaseOnboardingWork({currentUserPersonalDetails, shouldUseNativeStyles, Date: Fri, 3 May 2024 23:00:16 +0700 Subject: [PATCH 02/10] only go to business page if the selected purpose is manage team --- src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx b/src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx index 7030ef2dc33b..0a3c8b853013 100644 --- a/src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx +++ b/src/pages/OnboardingPurpose/BaseOnboardingPurpose.tsx @@ -75,7 +75,12 @@ function BaseOnboardingPurpose({shouldUseNativeStyles, shouldEnableMaxHeight, on return; } - Navigation.navigate(ROUTES.ONBOARDING_WORK); + if (selectedPurpose === CONST.ONBOARDING_CHOICES.MANAGE_TEAM) { + Navigation.navigate(ROUTES.ONBOARDING_WORK); + return; + } + + Navigation.navigate(ROUTES.ONBOARDING_PERSONAL_DETAILS); }, [selectedPurpose]); const menuItems: MenuItemProps[] = Object.values(CONST.ONBOARDING_CHOICES).map((choice) => { From 33635346d506fd7ad7e0b473c08faad2ebe5bc8d Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Fri, 3 May 2024 23:37:42 +0700 Subject: [PATCH 03/10] should create ws before navigating --- src/pages/OnboardingWork/BaseOnboardingWork.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/pages/OnboardingWork/BaseOnboardingWork.tsx b/src/pages/OnboardingWork/BaseOnboardingWork.tsx index c15e40ac0301..7662ab5a70b1 100644 --- a/src/pages/OnboardingWork/BaseOnboardingWork.tsx +++ b/src/pages/OnboardingWork/BaseOnboardingWork.tsx @@ -43,16 +43,14 @@ function BaseOnboardingWork({currentUserPersonalDetails, shouldUseNativeStyles, return; } + const work = values.work.trim(); + const {adminsChatReportID} = Policy.createWorkspace(undefined, true, work); + if (OPEN_WORK_PAGE_PURPOSES.includes(onboardingPurposeSelected)) { Navigation.navigate(ROUTES.ONBOARDING_PERSONAL_DETAILS); - return; } - const work = values.work.trim(); - - const {adminsChatReportID} = Policy.createWorkspace(undefined, true, work); - Report.completeOnboarding( onboardingPurposeSelected, CONST.ONBOARDING_MESSAGES[onboardingPurposeSelected], From 47d4ad80ecabc48d44311699a5208e56170217af Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Sat, 4 May 2024 00:57:58 +0700 Subject: [PATCH 04/10] remove redundant --- .../OnboardingWork/BaseOnboardingWork.tsx | 35 ++----------------- 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/src/pages/OnboardingWork/BaseOnboardingWork.tsx b/src/pages/OnboardingWork/BaseOnboardingWork.tsx index 7662ab5a70b1..b0ac8afd055f 100644 --- a/src/pages/OnboardingWork/BaseOnboardingWork.tsx +++ b/src/pages/OnboardingWork/BaseOnboardingWork.tsx @@ -42,41 +42,10 @@ function BaseOnboardingWork({currentUserPersonalDetails, shouldUseNativeStyles, if (!onboardingPurposeSelected) { return; } - const work = values.work.trim(); const {adminsChatReportID} = Policy.createWorkspace(undefined, true, work); - - if (OPEN_WORK_PAGE_PURPOSES.includes(onboardingPurposeSelected)) { - Navigation.navigate(ROUTES.ONBOARDING_PERSONAL_DETAILS); - return; - } - - Report.completeOnboarding( - onboardingPurposeSelected, - CONST.ONBOARDING_MESSAGES[onboardingPurposeSelected], - { - login: currentUserPersonalDetails.login ?? '', - firstName: currentUserPersonalDetails.firstName ?? '', - lastName: currentUserPersonalDetails.lastName ?? '', - }, - adminsChatReportID, - ); - - Navigation.dismissModal(); - - // Only navigate to concierge chat when central pane is visible - // Otherwise stay on the chats screen. - if (isSmallScreenWidth) { - Navigation.navigate(ROUTES.HOME); - } else { - Report.navigateToConciergeChat(); - } - - // Small delay purely due to design considerations, - // no special technical reasons behind that. - setTimeout(() => { - Navigation.navigate(ROUTES.WELCOME_VIDEO_ROOT); - }, variables.welcomeVideoDelay); + Navigation.navigate(ROUTES.ONBOARDING_PERSONAL_DETAILS); + return; }, [currentUserPersonalDetails.firstName, currentUserPersonalDetails.lastName, currentUserPersonalDetails.login, isSmallScreenWidth, onboardingPurposeSelected], ); From 86cf7a2a5f86c1732cd5f88e8cee460773dc8733 Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Sat, 4 May 2024 01:08:18 +0700 Subject: [PATCH 05/10] lint fix --- src/pages/OnboardingWork/BaseOnboardingWork.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pages/OnboardingWork/BaseOnboardingWork.tsx b/src/pages/OnboardingWork/BaseOnboardingWork.tsx index b0ac8afd055f..adfe222202b6 100644 --- a/src/pages/OnboardingWork/BaseOnboardingWork.tsx +++ b/src/pages/OnboardingWork/BaseOnboardingWork.tsx @@ -18,9 +18,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; import * as ValidationUtils from '@libs/ValidationUtils'; -import variables from '@styles/variables'; import * as Policy from '@userActions/Policy'; -import * as Report from '@userActions/Report'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; @@ -43,9 +41,8 @@ function BaseOnboardingWork({currentUserPersonalDetails, shouldUseNativeStyles, return; } const work = values.work.trim(); - const {adminsChatReportID} = Policy.createWorkspace(undefined, true, work); + Policy.createWorkspace(undefined, true, work); Navigation.navigate(ROUTES.ONBOARDING_PERSONAL_DETAILS); - return; }, [currentUserPersonalDetails.firstName, currentUserPersonalDetails.lastName, currentUserPersonalDetails.login, isSmallScreenWidth, onboardingPurposeSelected], ); From 6d22d289a623a3065ac5ea7aa6d44feae43a0c8c Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Sat, 4 May 2024 01:27:24 +0700 Subject: [PATCH 06/10] lint fix --- src/pages/OnboardingWork/BaseOnboardingWork.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/OnboardingWork/BaseOnboardingWork.tsx b/src/pages/OnboardingWork/BaseOnboardingWork.tsx index adfe222202b6..0544e3a1ac86 100644 --- a/src/pages/OnboardingWork/BaseOnboardingWork.tsx +++ b/src/pages/OnboardingWork/BaseOnboardingWork.tsx @@ -44,7 +44,7 @@ function BaseOnboardingWork({currentUserPersonalDetails, shouldUseNativeStyles, Policy.createWorkspace(undefined, true, work); Navigation.navigate(ROUTES.ONBOARDING_PERSONAL_DETAILS); }, - [currentUserPersonalDetails.firstName, currentUserPersonalDetails.lastName, currentUserPersonalDetails.login, isSmallScreenWidth, onboardingPurposeSelected], + [onboardingPurposeSelected], ); const validate = (values: FormOnyxValues<'onboardingWorkForm'>) => { From 0eaa2ba478483d419542912a40c31b2ff50561a4 Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Sat, 4 May 2024 01:29:31 +0700 Subject: [PATCH 07/10] lin fix --- src/pages/OnboardingWork/BaseOnboardingWork.tsx | 15 ++++++--------- src/pages/OnboardingWork/types.ts | 10 ++++------ 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/pages/OnboardingWork/BaseOnboardingWork.tsx b/src/pages/OnboardingWork/BaseOnboardingWork.tsx index 0544e3a1ac86..7fa2e7ab7294 100644 --- a/src/pages/OnboardingWork/BaseOnboardingWork.tsx +++ b/src/pages/OnboardingWork/BaseOnboardingWork.tsx @@ -9,7 +9,6 @@ import KeyboardAvoidingView from '@components/KeyboardAvoidingView'; import OfflineIndicator from '@components/OfflineIndicator'; import Text from '@components/Text'; import TextInput from '@components/TextInput'; -import withCurrentUserPersonalDetails from '@components/withCurrentUserPersonalDetails'; import useDisableModalDismissOnEscape from '@hooks/useDisableModalDismissOnEscape'; import useLocalize from '@hooks/useLocalize'; import useOnboardingLayout from '@hooks/useOnboardingLayout'; @@ -27,7 +26,7 @@ import type {BaseOnboardingWorkOnyxProps, BaseOnboardingWorkProps} from './types const OPEN_WORK_PAGE_PURPOSES = [CONST.ONBOARDING_CHOICES.MANAGE_TEAM]; -function BaseOnboardingWork({currentUserPersonalDetails, shouldUseNativeStyles, onboardingPurposeSelected}: BaseOnboardingWorkProps) { +function BaseOnboardingWork({shouldUseNativeStyles, onboardingPurposeSelected}: BaseOnboardingWorkProps) { const styles = useThemeStyles(); const {translate} = useLocalize(); const {isSmallScreenWidth} = useWindowDimensions(); @@ -113,10 +112,8 @@ function BaseOnboardingWork({currentUserPersonalDetails, shouldUseNativeStyles, BaseOnboardingWork.displayName = 'BaseOnboardingWork'; -export default withCurrentUserPersonalDetails( - withOnyx({ - onboardingPurposeSelected: { - key: ONYXKEYS.ONBOARDING_PURPOSE_SELECTED, - }, - })(BaseOnboardingWork), -); +export default withOnyx({ + onboardingPurposeSelected: { + key: ONYXKEYS.ONBOARDING_PURPOSE_SELECTED, + }, +})(BaseOnboardingWork); diff --git a/src/pages/OnboardingWork/types.ts b/src/pages/OnboardingWork/types.ts index 5bef8048628d..954c8c15b31d 100644 --- a/src/pages/OnboardingWork/types.ts +++ b/src/pages/OnboardingWork/types.ts @@ -1,5 +1,4 @@ import type {OnyxEntry} from 'react-native-onyx'; -import type {WithCurrentUserPersonalDetailsProps} from '@components/withCurrentUserPersonalDetails'; import type {OnboardingPurposeType} from '@src/CONST'; type OnboardingWorkProps = Record; @@ -9,10 +8,9 @@ type BaseOnboardingWorkOnyxProps = { onboardingPurposeSelected: OnyxEntry; }; -type BaseOnboardingWorkProps = WithCurrentUserPersonalDetailsProps & - BaseOnboardingWorkOnyxProps & { - /* Whether to use native styles tailored for native devices */ - shouldUseNativeStyles: boolean; - }; +type BaseOnboardingWorkProps = BaseOnboardingWorkOnyxProps & { + /* Whether to use native styles tailored for native devices */ + shouldUseNativeStyles: boolean; +}; export type {OnboardingWorkProps, BaseOnboardingWorkOnyxProps, BaseOnboardingWorkProps}; From 25c9858b43789ca0fce53965bc4cc2c5eb21ef44 Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Sat, 4 May 2024 01:58:42 +0700 Subject: [PATCH 08/10] add new ONYX field --- src/ONYXKEYS.ts | 4 ++++ src/libs/actions/Welcome.ts | 6 ++++- .../BaseOnboardingPersonalDetails.tsx | 23 ++++++++++++++----- src/pages/OnboardingPersonalDetails/types.ts | 3 +++ .../OnboardingWork/BaseOnboardingWork.tsx | 4 +++- 5 files changed, 32 insertions(+), 8 deletions(-) diff --git a/src/ONYXKEYS.ts b/src/ONYXKEYS.ts index 1a27d691e2ef..88818c3eb7c6 100755 --- a/src/ONYXKEYS.ts +++ b/src/ONYXKEYS.ts @@ -282,6 +282,9 @@ const ONYXKEYS = { /** Onboarding Purpose selected by the user during Onboarding flow */ ONBOARDING_PURPOSE_SELECTED: 'onboardingPurposeSelected', + /** Onboarding Purpose selected by the user during Onboarding flow */ + ONBOARDING_ADMINS_CHAT_REPORT_ID: 'onboardingAdminsChatReportID', + // Max width supported for HTML element MAX_CANVAS_WIDTH: 'maxCanvasWidth', @@ -655,6 +658,7 @@ type OnyxValuesMapping = { [ONYXKEYS.MAX_CANVAS_HEIGHT]: number; [ONYXKEYS.MAX_CANVAS_WIDTH]: number; [ONYXKEYS.ONBOARDING_PURPOSE_SELECTED]: string; + [ONYXKEYS.ONBOARDING_ADMINS_CHAT_REPORT_ID]: string; [ONYXKEYS.IS_SEARCHING_FOR_REPORTS]: boolean; [ONYXKEYS.LAST_VISITED_PATH]: string | undefined; [ONYXKEYS.RECENTLY_USED_REPORT_FIELDS]: OnyxTypes.RecentlyUsedReportFields; diff --git a/src/libs/actions/Welcome.ts b/src/libs/actions/Welcome.ts index d723d3a5cd6d..3f4c50924e9a 100644 --- a/src/libs/actions/Welcome.ts +++ b/src/libs/actions/Welcome.ts @@ -69,6 +69,10 @@ function setOnboardingPurposeSelected(value: OnboardingPurposeType) { Onyx.set(ONYXKEYS.ONBOARDING_PURPOSE_SELECTED, value ?? null); } +function setOnboardingAdminsChatReportID(adminsChatReportID?: string) { + Onyx.set(ONYXKEYS.ONBOARDING_ADMINS_CHAT_REPORT_ID, adminsChatReportID ?? null); +} + Onyx.connect({ key: ONYXKEYS.NVP_ONBOARDING, initWithStoredValues: false, @@ -130,4 +134,4 @@ function resetAllChecks() { isLoadingReportData = true; } -export {onServerDataReady, isOnboardingFlowCompleted, setOnboardingPurposeSelected, resetAllChecks}; +export {onServerDataReady, isOnboardingFlowCompleted, setOnboardingPurposeSelected, resetAllChecks, setOnboardingAdminsChatReportID}; diff --git a/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx b/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx index af76313a00e9..eb982d47f9b1 100644 --- a/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx +++ b/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx @@ -22,13 +22,14 @@ import * as ValidationUtils from '@libs/ValidationUtils'; import variables from '@styles/variables'; import * as PersonalDetails from '@userActions/PersonalDetails'; import * as Report from '@userActions/Report'; +import * as Welcome from '@userActions/Welcome'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; import INPUT_IDS from '@src/types/form/DisplayNameForm'; import type {BaseOnboardingPersonalDetailsOnyxProps, BaseOnboardingPersonalDetailsProps} from './types'; -function BaseOnboardingPersonalDetails({currentUserPersonalDetails, shouldUseNativeStyles, onboardingPurposeSelected}: BaseOnboardingPersonalDetailsProps) { +function BaseOnboardingPersonalDetails({currentUserPersonalDetails, shouldUseNativeStyles, onboardingPurposeSelected, onboardingAdminsChatReportID}: BaseOnboardingPersonalDetailsProps) { const styles = useThemeStyles(); const {translate} = useLocalize(); const {isSmallScreenWidth} = useWindowDimensions(); @@ -49,11 +50,18 @@ function BaseOnboardingPersonalDetails({currentUserPersonalDetails, shouldUseNat return; } - Report.completeOnboarding(onboardingPurposeSelected, CONST.ONBOARDING_MESSAGES[onboardingPurposeSelected], { - login: currentUserPersonalDetails.login ?? '', - firstName, - lastName, - }); + Report.completeOnboarding( + onboardingPurposeSelected, + CONST.ONBOARDING_MESSAGES[onboardingPurposeSelected], + { + login: currentUserPersonalDetails.login ?? '', + firstName, + lastName, + }, + onboardingAdminsChatReportID, + ); + + Welcome.setOnboardingAdminsChatReportID(); Navigation.dismissModal(); @@ -178,5 +186,8 @@ export default withCurrentUserPersonalDetails( onboardingPurposeSelected: { key: ONYXKEYS.ONBOARDING_PURPOSE_SELECTED, }, + onboardingAdminsChatReportID: { + key: ONYXKEYS.ONBOARDING_ADMINS_CHAT_REPORT_ID, + }, })(BaseOnboardingPersonalDetails), ); diff --git a/src/pages/OnboardingPersonalDetails/types.ts b/src/pages/OnboardingPersonalDetails/types.ts index 4828cc6e73bd..91951e0da2fc 100644 --- a/src/pages/OnboardingPersonalDetails/types.ts +++ b/src/pages/OnboardingPersonalDetails/types.ts @@ -7,6 +7,9 @@ type OnboardingPersonalDetailsProps = Record; type BaseOnboardingPersonalDetailsOnyxProps = { /** Saved onboarding purpose selected by the user */ onboardingPurposeSelected: OnyxEntry; + + /** Saved onboarding admin chat report ID */ + onboardingAdminsChatReportID: string; }; type BaseOnboardingPersonalDetailsProps = WithCurrentUserPersonalDetailsProps & diff --git a/src/pages/OnboardingWork/BaseOnboardingWork.tsx b/src/pages/OnboardingWork/BaseOnboardingWork.tsx index 7fa2e7ab7294..8fdbed73111e 100644 --- a/src/pages/OnboardingWork/BaseOnboardingWork.tsx +++ b/src/pages/OnboardingWork/BaseOnboardingWork.tsx @@ -18,6 +18,7 @@ import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; import * as ValidationUtils from '@libs/ValidationUtils'; import * as Policy from '@userActions/Policy'; +import * as Welcome from '@userActions/Welcome'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; @@ -40,7 +41,8 @@ function BaseOnboardingWork({shouldUseNativeStyles, onboardingPurposeSelected}: return; } const work = values.work.trim(); - Policy.createWorkspace(undefined, true, work); + const {adminsChatReportID} = Policy.createWorkspace(undefined, true, work); + Welcome.setOnboardingAdminsChatReportID(adminsChatReportID); Navigation.navigate(ROUTES.ONBOARDING_PERSONAL_DETAILS); }, [onboardingPurposeSelected], From 7d4d045ab3d49a1ad04c7e18fbb0a02e6506fdea Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Sat, 4 May 2024 02:06:46 +0700 Subject: [PATCH 09/10] TS error --- .../OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx | 2 +- src/pages/OnboardingPersonalDetails/types.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx b/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx index eb982d47f9b1..9ccbb8cf1949 100644 --- a/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx +++ b/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx @@ -58,7 +58,7 @@ function BaseOnboardingPersonalDetails({currentUserPersonalDetails, shouldUseNat firstName, lastName, }, - onboardingAdminsChatReportID, + onboardingAdminsChatReportID ?? undefined, ); Welcome.setOnboardingAdminsChatReportID(); diff --git a/src/pages/OnboardingPersonalDetails/types.ts b/src/pages/OnboardingPersonalDetails/types.ts index 91951e0da2fc..a89fe5ff8df7 100644 --- a/src/pages/OnboardingPersonalDetails/types.ts +++ b/src/pages/OnboardingPersonalDetails/types.ts @@ -9,7 +9,7 @@ type BaseOnboardingPersonalDetailsOnyxProps = { onboardingPurposeSelected: OnyxEntry; /** Saved onboarding admin chat report ID */ - onboardingAdminsChatReportID: string; + onboardingAdminsChatReportID: OnyxEntry; }; type BaseOnboardingPersonalDetailsProps = WithCurrentUserPersonalDetailsProps & From 7bb2cff7ea5a6dfabb0476a1fdbb39a07ac3be72 Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Sat, 4 May 2024 02:14:55 +0700 Subject: [PATCH 10/10] fix lint --- .../OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx b/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx index 9ccbb8cf1949..7fcb5c1c5de6 100644 --- a/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx +++ b/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx @@ -79,7 +79,7 @@ function BaseOnboardingPersonalDetails({currentUserPersonalDetails, shouldUseNat Navigation.navigate(ROUTES.WELCOME_VIDEO_ROOT); }, variables.welcomeVideoDelay); }, - [currentUserPersonalDetails.login, isSmallScreenWidth, onboardingPurposeSelected], + [currentUserPersonalDetails.login, isSmallScreenWidth, onboardingPurposeSelected, onboardingAdminsChatReportID], ); const validate = (values: FormOnyxValues<'onboardingPersonalDetailsForm'>) => {