From 5e568ad2371a5292ce10a4737556dc516d647a44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Cederstr=C3=B6m?= Date: Fri, 12 Jan 2018 16:00:11 +0100 Subject: [PATCH] Use redux connected router (#669) --- src/router.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/router.js b/src/router.js index bc030b8c..4ba72976 100644 --- a/src/router.js +++ b/src/router.js @@ -1,5 +1,5 @@ import React from 'react'; -import { Router, Switch } from 'dva/router'; +import { routerRedux, Switch } from 'dva/router'; import { LocaleProvider, Spin } from 'antd'; import zhCN from 'antd/lib/locale-provider/zh_CN'; import dynamic from 'dva/dynamic'; @@ -7,6 +7,7 @@ import { getRouterData } from './common/router'; import Authorized from './utils/Authorized'; import styles from './index.less'; +const { ConnectedRouter } = routerRedux; const { AuthorizedRoute } = Authorized; dynamic.setDefaultLoadingComponent(() => { return ; @@ -18,7 +19,7 @@ function RouterConfig({ history, app }) { const BasicLayout = routerData['/'].component; return ( - + - + ); } -- GitLab