-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TODO: React recently changes its API version. Some packages are still migrating. Need to be checked later. Fix "react-highlight": "github:briancappello/react-highlight#react-v16-compiled" akiran/react-highlight#39
- Loading branch information
1 parent
114c4ed
commit 4f9c2ed
Showing
5 changed files
with
61 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,27 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom"; | ||
import { Router, Route, IndexRoute, hashHistory } from "react-router"; | ||
import { Route, IndexRoute, Link } from "react-router"; | ||
import { HashRouter } from "react-router-dom"; | ||
|
||
import { Provider } from "react-redux" | ||
import store from "./store" | ||
|
||
import Phase from "./pages/Phase"; | ||
import Layout from "./pages/Layout"; | ||
import Footer from "./components/layout/Footer"; | ||
|
||
const app = document.getElementById('app'); | ||
|
||
const containerStyle = { | ||
marginTop: "30px" | ||
}; | ||
|
||
ReactDOM.render( | ||
<Provider store={store}> | ||
<Router history={hashHistory}> | ||
<Route path="/" component={Layout}> | ||
<IndexRoute component={Phase}></IndexRoute> | ||
</Route> | ||
</Router> | ||
<HashRouter> | ||
<div class="container-fluid" style={containerStyle}> | ||
<Route path="/" component={Layout} /> | ||
<Footer/> | ||
</div> | ||
</HashRouter> | ||
</Provider>, | ||
app); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
import { applyMiddleware, createStore } from "redux" | ||
import { createLogger } from 'redux-logger' | ||
|
||
import logger from "redux-logger" | ||
import thunk from "redux-thunk" | ||
import promise from "redux-promise-middleware" | ||
import promiseMiddleware from "redux-promise-middleware" | ||
import multi from 'redux-multi' | ||
|
||
import reducer from "./reducers" | ||
|
||
const middleware = applyMiddleware(multi, promise(), thunk, logger()) | ||
const middlewares = [multi, promiseMiddleware(), thunk]; | ||
|
||
export default createStore(reducer, middleware) | ||
const logger = createLogger({ | ||
collapsed: (getState, action, logEntry) => !logEntry.error, | ||
duration: true | ||
}); | ||
|
||
middlewares.push(logger); | ||
|
||
export default createStore(reducer, applyMiddleware(...middlewares)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters