Skip to content

Commit

Permalink
Merge pull request #467 from ClimateMind/466-fix-missing-useraname-on…
Browse files Browse the repository at this point in the history
…-userblandingpage

[CLOSES #466] Fix Missing UserAName on UserBLandingPage
  • Loading branch information
epixieme authored Apr 5, 2024
2 parents 67b715b + 0f586c8 commit ccff9a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions src/pages/UserBPages/UserBLandingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ function UserBLandingPage() {
const { conversationId } = useParams();

const dispatch = useAppDispatch();
const { sessionId } = useAppSelector(state => state.auth.userB);
const { userAName } = useAppSelector(state => state.userB);
const { sessionId } = useAppSelector((state) => state.auth.userB);
const { userAName } = useAppSelector((state) => state.userB);

const { recordUserBVisit } = useRecordUserBVisit();
const { conversation } = useConversation(conversationId ?? '');
Expand All @@ -27,13 +27,13 @@ function UserBLandingPage() {
navigate(`${ROUTES.USERB_SHARED_SUCCESS_PAGE}/${conversationId}`);
}
}
}, [sessionId, conversationId])
}, [sessionId, conversation, conversationId]);

return (
<Page style={{ paddingBottom: 200 }}>
<PageContent style={{ textAlign: 'center' }}>
<CmTypography variant="h1">Climate Mind</CmTypography>
<img src='/userb-landing-page-cm-logo.svg' alt='Climate Mind Logo' style={{ marginTop: 10, marginBottom: 10 }} />
<img src="/userb-landing-page-cm-logo.svg" alt="Climate Mind Logo" style={{ marginTop: 10, marginBottom: 10 }} />

<CmTypography variant="h2">{userAName} invited you to take our core values quiz!</CmTypography>

Expand All @@ -42,17 +42,16 @@ function UserBLandingPage() {
</CmTypography>

<CmTypography variant="body" style={{ textAlign: 'center', marginTop: 30, marginBottom: 30 }}>
We’ll match your core values and personalized climate topics
with {userAName}'s to unlock your potential to act together
We’ll match your core values and personalized climate topics with {userAName}'s to unlock your potential to act together
</CmTypography>

<CmTypography variant="h3">Already have an account?</CmTypography>

<CmButton color='userb' text="Login" onClick={() => {}} />
<CmButton color="userb" text="Login" onClick={() => {}} />
</PageContent>

<FooterAppBar bgColor={'#B9DEDF'} align="center">
<CmButton color='userb' text="Next: How does ClimateMind work?" onClick={() => navigate(`${ROUTES.USERB_HOW_CM_WORKS_PAGE}/${conversationId}`)} />
<CmButton color="userb" text="Next: How does ClimateMind work?" onClick={() => navigate(`${ROUTES.USERB_HOW_CM_WORKS_PAGE}/${conversationId}`)} />
</FooterAppBar>
</Page>
);
Expand Down
2 changes: 1 addition & 1 deletion src/router/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const router = createBrowserRouter([
path: `${ROUTES.USERB_NO_CONSENT_PAGE}/:conversationId`,
element: <UserBNoConsentPage />,
},
]
],
},
]);

Expand Down

0 comments on commit ccff9a7

Please sign in to comment.