mirror of
https://github.com/wassname/talk.git
synced 2026-07-17 11:33:39 +08:00
Merge pull request #1405 from coralproject/purge-config-auth-token
Purge config.auth_token from redux on logout
This commit is contained in:
@@ -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