This commit is contained in:
crusader 2017-06-29 16:58:51 +09:00
parent c790791b6c
commit 821cde7afd
2 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1,14 @@
import Action from 'commons/redux/Action';
import { RouterState, LocationActionPayload, LOCATION_CHANGE } from 'react-router-redux';
export const initRouterState: RouterState = {
location: null,
};
export function routerReducer(state: RouterState = initRouterState, action: Action<LocationActionPayload>): RouterState {
if (action.type === LOCATION_CHANGE) {
return state;
}
return state;
}

View File

@ -1,7 +1,8 @@
import { Action, combineReducers } from 'redux'; import { Action, combineReducers } from 'redux';
import { routerReducer, RouterState } from 'react-router-redux'; import { RouterState, LocationActionPayload, LOCATION_CHANGE } from 'react-router-redux';
import { SagaIterator } from 'redux-saga'; import { SagaIterator } from 'redux-saga';
import { fork } from 'redux-saga/effects'; import { fork } from 'redux-saga/effects';
import { routerReducer } from 'commons/redux/router';
import * as Member from 'member'; import * as Member from 'member';