- Linting... Prettier...
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import { LOGIN_SUCCESS, SET_AUTH, UNSET_AUTH } from '../constants/actionTypes.js';
|
||||
|
||||
export const auth = (state = null, action) => {
|
||||
switch (action.type) {
|
||||
case LOGIN_SUCCESS:
|
||||
return action.payload.token;
|
||||
case SET_AUTH:
|
||||
return action.payload;
|
||||
case UNSET_AUTH:
|
||||
return null;
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
switch (action.type) {
|
||||
case LOGIN_SUCCESS:
|
||||
return action.payload.token;
|
||||
case SET_AUTH:
|
||||
return action.payload;
|
||||
case UNSET_AUTH:
|
||||
return null;
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user