ing
This commit is contained in:
parent
c790791b6c
commit
821cde7afd
14
src/ts/commons/redux/router.ts
Normal file
14
src/ts/commons/redux/router.ts
Normal 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;
|
||||||
|
}
|
|
@ -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';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user