Skip to content

Commit

Permalink
Update slice.js
Browse files Browse the repository at this point in the history
  • Loading branch information
MargoMarm committed Sep 20, 2023
1 parent 9c9b4c9 commit de141f4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/redux/auth/slice.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ const initialState = {
name: null,
email: null,
avatarURL: null,
dailyTime: null,
dailyСalories: null,
},
bodyParameters: {},

error: null,
token: null,
isLoggedIn: false,
Expand All @@ -32,6 +36,10 @@ export const authSlice = createSlice({
state.user.email = action.payload.email;
state.user.avatarURL = action.payload.avatarURL;
state.token = action.payload.token;
state.user.dailyTime = action.payload.dailyTime;
state.user.dailyСalories = action.payload.dailyСalories;
state.bodyParameters = { ...action.payload.bodyParameters };

state.isLoggedIn = true;
state.error = null;
});
Expand Down

0 comments on commit de141f4

Please sign in to comment.