Refactoring redux state into different reducers
This commit is contained in:
parent
7060bdf04b
commit
e8ff4c8e56
23 changed files with 352 additions and 223 deletions
|
@ -1,5 +1,6 @@
|
|||
import { ACCESS_TOKEN_SET } from '../actions/meta';
|
||||
import Immutable from 'immutable';
|
||||
import { ACCESS_TOKEN_SET } from '../actions/meta';
|
||||
import { ACCOUNT_SET_SELF } from '../actions/accounts';
|
||||
import Immutable from 'immutable';
|
||||
|
||||
const initialState = Immutable.Map();
|
||||
|
||||
|
@ -7,6 +8,8 @@ export default function meta(state = initialState, action) {
|
|||
switch(action.type) {
|
||||
case ACCESS_TOKEN_SET:
|
||||
return state.set('access_token', action.token);
|
||||
case ACCOUNT_SET_SELF:
|
||||
return state.set('me', action.account.id);
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue