Skip to content

Commit 5aff2d7

Browse files
committed
feat(router): add router.start() and formatting
1 parent 0d090f8 commit 5aff2d7

3 files changed

Lines changed: 6 additions & 10 deletions

File tree

src/app/components/Link.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as React from "react";
21
import {isEqual} from "lodash";
2+
import * as React from "react";
33
import {connect} from "react-redux";
44
import {actions} from "redux-router5";
55
import {State as IRouterState} from "router5";

src/app/containers/App.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import * as es from "react-intl/locale-data/es";
88
import * as fr from "react-intl/locale-data/fr";
99
import {connect} from "react-redux";
1010
import {routeNodeSelector} from "redux-router5";
11-
1211
import {cssRaw, cssRule, style} from "typestyle";
1312

1413
import {Header} from "../components";
@@ -47,7 +46,7 @@ class App extends React.Component<any, any> {
4746
}
4847

4948
public render(): JSX.Element {
50-
const { route } = this.props;
49+
const {route} = this.props;
5150
const segment = route ? route.name.split(".")[0] : undefined;
5251
return (
5352
<IntlProvider locale={this.props.languages.payload.locale} messages={this.props.languages.payload.languageData}>

src/client.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
const appConfig = require("../config/main");
2-
31
import * as e6p from "es6-promise";
42
(e6p as any).polyfill();
53
import "isomorphic-fetch";
6-
74
import * as React from "react";
85
import * as ReactDOM from "react-dom";
96
import {Provider} from "react-redux";
@@ -13,15 +10,15 @@ import {configureStore} from "./app/redux/configureStore";
1310
import {configureRouter} from "./app/routes/configureRouter";
1411
import rootSaga from "./app/sagas/rootSaga";
1512

13+
const appConfig = require("../config/main");
14+
1615
const ReactHotLoader = appConfig.env !== "production"
1716
? require("react-hot-loader").AppContainer
1817
: ({ children }) => React.Children.only(children);
1918

2019
const router = configureRouter();
21-
const store = configureStore(
22-
router,
23-
window.__INITIAL_STATE__
24-
);
20+
const store = configureStore(router, window.__INITIAL_STATE__);
21+
router.start();
2522
store.runSaga(rootSaga);
2623

2724
ReactDOM.render(

0 commit comments

Comments
 (0)