aboutsummaryrefslogtreecommitdiff
path: root/src/store
diff options
context:
space:
mode:
Diffstat (limited to 'src/store')
-rw-r--r--src/store/initialStates.ts1
-rw-r--r--src/store/reducers/userReducer.ts5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/store/initialStates.ts b/src/store/initialStates.ts
index 7fd3ac5a..e0f9d776 100644
--- a/src/store/initialStates.ts
+++ b/src/store/initialStates.ts
@@ -18,6 +18,7 @@ export const NO_PROFILE: ProfileInfoType = {
birthday: undefined,
university_class: 2021,
university: undefined,
+ badges: [],
//Default to an invalid value and ignore it gracefully while showing tutorials / popups.
profile_completion_stage: -1,
suggested_people_linked: -1,
diff --git a/src/store/reducers/userReducer.ts b/src/store/reducers/userReducer.ts
index a8789c1d..97bf845c 100644
--- a/src/store/reducers/userReducer.ts
+++ b/src/store/reducers/userReducer.ts
@@ -42,6 +42,10 @@ const userDataSlice = createSlice({
}
},
+ profileBadgesUpdated: (state, action) => {
+ state.profile.badges = action.payload.badges;
+ },
+
profileCompletionStageUpdated: (state, action) => {
state.profile.profile_completion_stage = action.payload.stage;
},
@@ -90,6 +94,7 @@ export const {
setReplyPosted,
setSuggestedPeopleImage,
clearHeaderAndProfileImages,
+ profileBadgesUpdated,
// setChatClientReady,
} = userDataSlice.actions;
export const userDataReducer = userDataSlice.reducer;