From b3785ffa751bb92eea558415dce92af355635430 Mon Sep 17 00:00:00 2001 From: Alvita Huang Date: Tue, 27 Jun 2017 23:18:43 +0800 Subject: [PATCH 1/2] export location_change from router --- src/modules/RouterInteraction/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/RouterInteraction/index.js b/src/modules/RouterInteraction/index.js index b7d1d3727c..3b4d8c1e80 100644 --- a/src/modules/RouterInteraction/index.js +++ b/src/modules/RouterInteraction/index.js @@ -1,6 +1,6 @@ import RcModule from 'ringcentral-integration/lib/RcModule'; import { useRouterHistory, createMemoryHistory, hashHistory } from 'react-router'; -import { syncHistoryWithStore, routerReducer } from 'react-router-redux'; +import { syncHistoryWithStore, routerReducer, LOCATION_CHANGE } from 'react-router-redux'; function getDefaultHistory() { // if (typeof window !== 'undefined') { @@ -33,4 +33,8 @@ export default class RouterInteraction extends RcModule { get currentPath() { return this.state.locationBeforeTransitions.pathname; } + + get locationChange() { + return LOCATION_CHANGE; + } } From bc7b45f7c9f4aaf3cb815e6bb6ac5d3d67beeb12 Mon Sep 17 00:00:00 2001 From: Alvita Huang Date: Wed, 5 Jul 2017 23:02:22 +0800 Subject: [PATCH 2/2] export location change as actionTypes --- src/modules/RouterInteraction/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/RouterInteraction/index.js b/src/modules/RouterInteraction/index.js index 3b4d8c1e80..cbc057be42 100644 --- a/src/modules/RouterInteraction/index.js +++ b/src/modules/RouterInteraction/index.js @@ -34,7 +34,9 @@ export default class RouterInteraction extends RcModule { return this.state.locationBeforeTransitions.pathname; } - get locationChange() { - return LOCATION_CHANGE; + get actionTypes() { + return { + locationChange: LOCATION_CHANGE + }; } }