mirror of
https://github.com/wassname/talk.git
synced 2026-06-29 09:07:03 +08:00
Purge config.auth_token from redux on logout
This commit is contained in:
committed by
Wyatt Johnson
parent
a55f03f23c
commit
f3f481fcf0
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user