Skip to content

Commit aa28688

Browse files
authored
Merge pull request Expensify#66183 from nkdengineer/fix/64032
fix: first and last name entered during onboarding is not saved
2 parents 8756f7a + fbef653 commit aa28688

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/pages/OnboardingInterestedFeatures/BaseOnboardingInterestedFeatures.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import ScreenWrapper from '@components/ScreenWrapper';
1212
import ScrollView from '@components/ScrollView';
1313
import Section from '@components/Section';
1414
import Text from '@components/Text';
15+
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
1516
import useLocalize from '@hooks/useLocalize';
1617
import useNetwork from '@hooks/useNetwork';
1718
import useOnboardingMessages from '@hooks/useOnboardingMessages';
@@ -49,6 +50,7 @@ function BaseOnboardingInterestedFeatures({shouldUseNativeStyles}: BaseOnboardin
4950
const {onboardingIsMediumOrLargerScreenWidth, isSmallScreenWidth} = useResponsiveLayout();
5051
const [onboardingPurposeSelected] = useOnyx(ONYXKEYS.ONBOARDING_PURPOSE_SELECTED, {canBeMissing: true});
5152
const [onboardingPolicyID] = useOnyx(ONYXKEYS.ONBOARDING_POLICY_ID, {canBeMissing: true});
53+
const currentUserPersonalDetails = useCurrentUserPersonalDetails();
5254
const [allPolicies] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {canBeMissing: false});
5355
const [onboardingAdminsChatReportID] = useOnyx(ONYXKEYS.ONBOARDING_ADMINS_CHAT_REPORT_ID, {canBeMissing: true});
5456
const [onboardingCompanySize] = useOnyx(ONYXKEYS.ONBOARDING_COMPANY_SIZE, {canBeMissing: true});
@@ -197,6 +199,8 @@ function BaseOnboardingInterestedFeatures({shouldUseNativeStyles}: BaseOnboardin
197199
onboardingPolicyID: policyID,
198200
companySize: onboardingCompanySize,
199201
userReportedIntegration: newUserReportedIntegration,
202+
firstName: currentUserPersonalDetails?.firstName,
203+
lastName: currentUserPersonalDetails?.lastName,
200204
});
201205

202206
if (shouldOnboardingRedirectToOldDot(onboardingCompanySize, newUserReportedIntegration)) {
@@ -235,6 +239,8 @@ function BaseOnboardingInterestedFeatures({shouldUseNativeStyles}: BaseOnboardin
235239
userReportedIntegration,
236240
features,
237241
selectedFeatures,
242+
currentUserPersonalDetails?.firstName,
243+
currentUserPersonalDetails?.lastName,
238244
]);
239245

240246
// Create items for enabled features

0 commit comments

Comments
 (0)