Return user and Token instead of decoding token. Added transform to not store image in redux store
This commit is contained in:
1 parent
440716b021
commit
f97aa1ca8c
4 files changed
+26
-18
No files matched your search
@@ -67,10 +67,8 @@ const handleAuthFulfilled = (state, action) => {
|
||||
state.isLoading = false;
|
||||
state.success = action.payload.success;
|
||||
state.msg = action.payload.msg;
|
||||
state.authToken = action.payload.data;
|
||||
const decodedToken = jwtDecode(action.payload.data);
|
||||
const user = { ...decodedToken };
|
||||
state.user = user;
|
||||
state.authToken = action.payload.data.token;
|
||||
state.user = action.payload.data.user;
|
||||
};
|
||||
const handleAuthRejected = (state, action) => {
|
||||
state.isLoading = false;
|
||||
|
||||
Reference in new issue
Block a user