@@ -24,7 +24,7 @@ import {FallbackAvatar, IntacctSquare, NetSuiteSquare, QBOSquare, XeroSquare} fr
2424import * as defaultGroupAvatars from '@components/Icon/GroupDefaultAvatars' ;
2525import * as defaultWorkspaceAvatars from '@components/Icon/WorkspaceDefaultAvatars' ;
2626import type { MoneyRequestAmountInputProps } from '@components/MoneyRequestAmountInput' ;
27- import type { IOUAction , IOUType , OnboardingAccounting , OnboardingCompanySize , OnboardingPurpose , OnboardingTaskLinks } from '@src/CONST' ;
27+ import type { IOUAction , IOUType , OnboardingAccounting } from '@src/CONST' ;
2828import CONST from '@src/CONST' ;
2929import type { ParentNavigationSummaryParams } from '@src/languages/params' ;
3030import type { TranslationPaths } from '@src/languages/types' ;
@@ -77,7 +77,8 @@ import {hasCreditBankAccount} from './actions/ReimbursementAccount/store';
7777import { handleReportChanged } from './actions/Report' ;
7878import type { GuidedSetupData , TaskForParameters } from './actions/Report' ;
7979import { isAnonymousUser as isAnonymousUserSession } from './actions/Session' ;
80- import getOnboardingMessages from './actions/Welcome/OnboardingFlowTasks' ;
80+ import { getOnboardingMessages } from './actions/Welcome/OnboardingFlow' ;
81+ import type { OnboardingCompanySize , OnboardingMessage , OnboardingPurpose , OnboardingTaskLinks } from './actions/Welcome/OnboardingFlow' ;
8182import type { AddCommentOrAttachmentParams } from './API/parameters' ;
8283import { convertToDisplayString } from './CurrencyUtils' ;
8384import DateUtils from './DateUtils' ;
@@ -855,8 +856,6 @@ type GetReportNameParams = {
855856
856857type ReportByPolicyMap = Record < string , Report [ ] > ;
857858
858- type OnboardingMessagesType = ValueOf < ReturnType < typeof getOnboardingMessages > [ 'onboardingMessages' ] > ;
859-
860859let currentUserEmail : string | undefined ;
861860let currentUserPrivateDomain : string | undefined ;
862861let currentUserAccountID : number | undefined ;
@@ -9831,22 +9830,21 @@ function canReportBeMentionedWithinPolicy(report: OnyxEntry<Report>, policyID: s
98319830function prepareOnboardingOnyxData (
98329831 introSelected : OnyxEntry < IntroSelected > ,
98339832 engagementChoice : OnboardingPurpose ,
9834- onboardingMessage : OnboardingMessagesType ,
9833+ onboardingMessage : OnboardingMessage ,
98359834 adminsChatReportID ?: string ,
98369835 onboardingPolicyID ?: string ,
98379836 userReportedIntegration ?: OnboardingAccounting ,
98389837 wasInvited ?: boolean ,
98399838 companySize ?: OnboardingCompanySize ,
98409839) {
9841- const { onboardingMessages} = getOnboardingMessages ( ) ;
98429840 if ( engagementChoice === CONST . ONBOARDING_CHOICES . PERSONAL_SPEND ) {
98439841 // eslint-disable-next-line no-param-reassign
9844- onboardingMessage = onboardingMessages [ CONST . ONBOARDING_CHOICES . PERSONAL_SPEND ] ;
9842+ onboardingMessage = getOnboardingMessages ( ) . onboardingMessages [ CONST . ONBOARDING_CHOICES . PERSONAL_SPEND ] ;
98459843 }
98469844
98479845 if ( engagementChoice === CONST . ONBOARDING_CHOICES . EMPLOYER || engagementChoice === CONST . ONBOARDING_CHOICES . SUBMIT ) {
98489846 // eslint-disable-next-line no-param-reassign
9849- onboardingMessage = onboardingMessages [ CONST . ONBOARDING_CHOICES . SUBMIT ] ;
9847+ onboardingMessage = getOnboardingMessages ( ) . onboardingMessages [ CONST . ONBOARDING_CHOICES . SUBMIT ] ;
98509848 }
98519849
98529850 // Guides are assigned and tasks are posted in the #admins room for the MANAGE_TEAM and TRACK_WORKSPACE onboarding actions, except for emails that have a '+'.
0 commit comments