Skip to content

Commit

Permalink
wip(user): n'associe pas un workspace lors de la récupération du prof…
Browse files Browse the repository at this point in the history
…il utilisateur
  • Loading branch information
thom4parisot committed Mar 5, 2025
1 parent d5da5cc commit f0c5d93
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions front/src/createReduxStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,17 +289,16 @@ function persistStateIntoLocalStorage({ getState }) {
}

function setProfile(state, action) {
const { user } = action
const { user, hasBooted = state.hasBooted } = action
if (!user) {
return { ...state, activeUser: undefined, hasBooted: true }
return { ...state, activeUser: undefined }
}

return {
...state,
hasBooted: true,
loggedIn: true,
hasBooted,
activeUser: {
...state.activeUser,
activeWorkspaceId: action.activeWorkspaceId,
...user,
},
}
Expand Down

0 comments on commit f0c5d93

Please sign in to comment.