fb-test-module
Version:
How to use: ``` import {store, getStore} from 'fb-test-module'; conf.DialogramApi = "API_BASE_URL"; conf.Platform = "mobile"; //use "web" if you are on webApp getStore(); //Inject store in your provider ``` and you'r readyt to go. # Base ## Act
19 lines (17 loc) • 589 B
text/typescript
import Immutable, { fromJS } from 'immutable';
import { ActionType } from '../BaseModel';
import { Status, SET_ENTITY } from '../BaseType';
import { SESSION_ENTITY, REMOVE_SESSION } from './Type';
import { baseReducer } from '../BaseReducer';
const initialState = fromJS({
status: Status.Default,
error: undefined
});
export const sessionReducer = (state = initialState, action) => {
switch (action.type) {
case REMOVE_SESSION:
return initialState;
default:
return baseReducer(state, action, SESSION_ENTITY);
};
}