2016-09-12 21:39:54 +02:00
|
|
|
import React from 'react';
|
|
|
|
import ReactDOM from 'react-dom';
|
2016-10-25 22:22:12 +02:00
|
|
|
import { Router, Route, IndexRedirect, hashHistory } from 'react-router';
|
2016-09-16 21:36:35 +02:00
|
|
|
import { Provider } from 'react-redux';
|
2016-09-28 23:02:23 +02:00
|
|
|
import thunkMiddleware from 'redux-thunk';
|
|
|
|
import { createStore, applyMiddleware } from 'redux';
|
2016-09-16 21:36:35 +02:00
|
|
|
|
|
|
|
import store from './store';
|
2016-10-24 21:00:20 +02:00
|
|
|
import App from './component/app';
|
2016-09-12 21:39:54 +02:00
|
|
|
|
2016-09-16 21:36:35 +02:00
|
|
|
import Features from './page/features';
|
2016-09-30 14:29:51 +02:00
|
|
|
import CreateFeatureToggle from './page/features/create';
|
2016-10-22 16:05:29 +02:00
|
|
|
import EditFeatureToggle from './page/features/edit';
|
2016-09-16 21:36:35 +02:00
|
|
|
import Strategies from './page/strategies';
|
2016-10-24 18:32:50 +02:00
|
|
|
import CreateStrategies from './page/strategies/create';
|
2016-09-22 13:52:54 +02:00
|
|
|
import HistoryPage from './page/history';
|
2016-09-16 21:36:35 +02:00
|
|
|
import Archive from './page/archive';
|
|
|
|
|
2016-09-28 23:02:23 +02:00
|
|
|
const unleashStore = createStore(
|
|
|
|
store,
|
|
|
|
applyMiddleware(
|
|
|
|
thunkMiddleware
|
|
|
|
)
|
|
|
|
);
|
2016-09-16 21:36:35 +02:00
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<Provider store={unleashStore}>
|
2016-10-25 22:22:12 +02:00
|
|
|
<Router history={hashHistory}>
|
2016-09-16 21:36:35 +02:00
|
|
|
<Route path="/" component={App}>
|
2016-09-30 14:29:51 +02:00
|
|
|
<IndexRedirect to="/features" />
|
|
|
|
<Route path="/features" component={Features} />
|
|
|
|
<Route path="/features/create" component={CreateFeatureToggle} />
|
2016-10-22 16:05:29 +02:00
|
|
|
<Route path="/features/edit/:name" component={EditFeatureToggle} />
|
2016-09-16 21:36:35 +02:00
|
|
|
<Route path="/strategies" component={Strategies} />
|
2016-10-24 18:32:50 +02:00
|
|
|
<Route path="/strategies/create" component={CreateStrategies} />
|
2016-09-22 13:52:54 +02:00
|
|
|
<Route path="/history" component={HistoryPage} />
|
2016-09-16 21:36:35 +02:00
|
|
|
<Route path="/archive" component={Archive} />
|
|
|
|
</Route>
|
|
|
|
</Router>
|
|
|
|
</Provider>, document.getElementById('app'));
|