Skip to content
Snippets Groups Projects
Commit 7d7463d9 authored by remip's avatar remip
Browse files

Change haveSeenWelcomeModal to isFirstConnection

parent 837dfce9
No related branches found
No related tags found
1 merge request!112Features/us248 welcome mail
...@@ -8,7 +8,7 @@ export const userProfileState = atom<UserProfile>({ ...@@ -8,7 +8,7 @@ export const userProfileState = atom<UserProfile>({
level: 0, level: 0,
challengeTypeHash: '', challengeTypeHash: '',
ecogestureHash: '', ecogestureHash: '',
haveSeenWelcomeModal: false, isFirstConnection: true,
haveSeenOldFluidModal: false, haveSeenOldFluidModal: false,
notificationEcogesture: [], notificationEcogesture: [],
report: false, report: false,
......
...@@ -65,7 +65,7 @@ const Content: React.FC<ContentProps> = ({ ...@@ -65,7 +65,7 @@ const Content: React.FC<ContentProps> = ({
mailService.SendMail(client, mailData) mailService.SendMail(client, mailData)
const userProfileService = new UserProfileService(client) const userProfileService = new UserProfileService(client)
await userProfileService await userProfileService
.updateUserProfile({ haveSeenWelcomeModal: true }) .updateUserProfile({ isFirstConnection: false })
.then(updatedUserProfile => { .then(updatedUserProfile => {
updatedUserProfile && setUserProfile(updatedUserProfile) updatedUserProfile && setUserProfile(updatedUserProfile)
}) })
...@@ -104,7 +104,7 @@ const Content: React.FC<ContentProps> = ({ ...@@ -104,7 +104,7 @@ const Content: React.FC<ContentProps> = ({
return ( return (
<> <>
<WelcomeModal <WelcomeModal
open={!userProfile.haveSeenWelcomeModal} open={userProfile.isFirstConnection}
handleCloseClick={setWelcomeModalViewed} handleCloseClick={setWelcomeModalViewed}
/> />
<FeedbackModal <FeedbackModal
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"level": 1, "level": 1,
"challengeTypeHash": "", "challengeTypeHash": "",
"ecogestureHash": "", "ecogestureHash": "",
"haveSeenWelcomeModal": false, "isFirstConnection": true,
"haveSeenOldFluidModal": false, "haveSeenOldFluidModal": false,
"notificationEcogesture": ["0085", "0092"], "notificationEcogesture": ["0085", "0092"],
"report": false "report": false
......
...@@ -5,7 +5,7 @@ export interface UserProfile { ...@@ -5,7 +5,7 @@ export interface UserProfile {
level: number level: number
challengeTypeHash: string challengeTypeHash: string
ecogestureHash: string ecogestureHash: string
haveSeenWelcomeModal: boolean isFirstConnection: boolean
haveSeenOldFluidModal: DateTime | false haveSeenOldFluidModal: DateTime | false
notificationEcogesture: string[] notificationEcogesture: string[]
report: boolean report: boolean
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment