Purge config.auth_token from redux on logout

This commit is contained in:
Chi Vinh Le
2018-02-26 22:58:29 +01:00
parent 00a40c9e34
commit 1fd64e873d
@@ -1,9 +1,15 @@
import { MERGE_CONFIG } from '../constants/config';
import { LOGOUT } from '../constants/auth';
const initialState = {};
export default function config(state = initialState, action) {
switch (action.type) {
case LOGOUT:
return {
...state,
auth_token: null,
};
case MERGE_CONFIG:
return {
...state,