diff --git a/src/applications/personalization/common/mocks/users/index.js b/src/applications/personalization/common/mocks/users/index.js index e8ce1612b8b7..6d8030538360 100644 --- a/src/applications/personalization/common/mocks/users/index.js +++ b/src/applications/personalization/common/mocks/users/index.js @@ -22,9 +22,9 @@ const simpleUser = { ], account: { accountUuid: '7d9e2bfb-13ae-45c8-8764-ea3c87cd8af3', - createdAt: '2023-10-05T12:00:00+00:00', }, profile: { + initialSignIn: '2023-10-05T12:00:00+00:00', email: 'vets.gov.user+75@gmail.com', firstName: 'MITCHELL', middleName: 'G', diff --git a/src/applications/personalization/dashboard/components/Dashboard.jsx b/src/applications/personalization/dashboard/components/Dashboard.jsx index d4132875ebc0..1640fd50a71d 100644 --- a/src/applications/personalization/dashboard/components/Dashboard.jsx +++ b/src/applications/personalization/dashboard/components/Dashboard.jsx @@ -135,7 +135,7 @@ const LOA1Content = ({ TOGGLE_NAMES.veteranOnboardingShowWelcomeMessageToNewUsers, ); - const userCreationTime = new Date(user.profile.createdAt); + const userCreationTime = new Date(user.profile.initialSignIn); const oneDayLater = new Date( userCreationTime.getTime() + 24 * 60 * 60 * 1000, ); diff --git a/src/applications/personalization/dashboard/tests/components/Dashboard.unit.spec.jsx b/src/applications/personalization/dashboard/tests/components/Dashboard.unit.spec.jsx index 21d59ead8027..402711c3e541 100644 --- a/src/applications/personalization/dashboard/tests/components/Dashboard.unit.spec.jsx +++ b/src/applications/personalization/dashboard/tests/components/Dashboard.unit.spec.jsx @@ -83,7 +83,7 @@ describe('', () => { }; // User created 8 hours ago is recent - initialState.user.profile.createdAt = new Date( + initialState.user.profile.initialSignIn = new Date( new Date().getTime() - 8 * 60 * 60 * 1000, ); @@ -107,7 +107,7 @@ describe('', () => { }; // User created 36 hours ago is not recent - initialState.user.profile.createdAt = new Date( + initialState.user.profile.initialSignIn = new Date( new Date().getTime() - 36 * 60 * 60 * 1000, ); diff --git a/src/platform/user/profile/utilities/index.js b/src/platform/user/profile/utilities/index.js index aff5cf2dce63..a354208630f5 100644 --- a/src/platform/user/profile/utilities/index.js +++ b/src/platform/user/profile/utilities/index.js @@ -30,10 +30,11 @@ export function mapRawUserDataToState(json) { const { data: { attributes: { - account: { accountUuid, createdAt } = {}, + account: { accountUuid } = {}, inProgressForms: savedForms, prefillsAvailable, profile: { + initialSignIn, signIn, birthDate: dob, email, @@ -61,7 +62,7 @@ export function mapRawUserDataToState(json) { const userState = { accountType: loa.current, accountUuid, - createdAt, + initialSignIn, dob, email, gender,