This commit is contained in:
Luke Berndt
2023-03-23 22:15:42 -04:00
parent 13c2112c73
commit ae6cabc7d1
6 changed files with 42 additions and 66 deletions

View File

@@ -40,7 +40,9 @@ export const userSlice = createSlice({
isWaiting: false,
authenticated: false,
hasAuthenticated: false,
userId: ""
userId: "",
admin: false,
email: "",
},
reducers: {
increment: (state) => {
@@ -58,6 +60,8 @@ export const userSlice = createSlice({
state.authenticated = true;
state.hasAuthenticated = true;
state.userId = payload.user.userId;
state.admin = payload.user.admin;
state.email = payload.user.email;
} else {
state.authenticated = false;
state.hasAuthenticated = true;