2016-11-16 22:19:38 +01:00
|
|
|
import 'whatwg-fetch';
|
2016-11-10 14:26:24 +01:00
|
|
|
import React from 'react';
|
|
|
|
import ReactDOM from 'react-dom';
|
|
|
|
import { Router, Route, IndexRedirect, hashHistory } from 'react-router';
|
|
|
|
import { Provider } from 'react-redux';
|
|
|
|
import thunkMiddleware from 'redux-thunk';
|
|
|
|
import { createStore, applyMiddleware } from 'redux';
|
|
|
|
|
|
|
|
import store from './store';
|
|
|
|
import App from './component/app';
|
|
|
|
|
|
|
|
import Features from './page/features';
|
|
|
|
import CreateFeatureToggle from './page/features/create';
|
|
|
|
import EditFeatureToggle from './page/features/edit';
|
|
|
|
import Strategies from './page/strategies';
|
|
|
|
import CreateStrategies from './page/strategies/create';
|
|
|
|
import HistoryPage from './page/history';
|
2016-11-22 22:04:30 +01:00
|
|
|
import HistoryTogglePage from './page/history/toggle';
|
2016-11-10 14:26:24 +01:00
|
|
|
import Archive from './page/archive';
|
2016-12-03 15:54:15 +01:00
|
|
|
import Applications from './page/applications';
|
2016-11-10 14:26:24 +01:00
|
|
|
import ClientStrategies from './page/client-strategies';
|
|
|
|
|
|
|
|
const unleashStore = createStore(
|
|
|
|
store,
|
|
|
|
applyMiddleware(
|
|
|
|
thunkMiddleware
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<Provider store={unleashStore}>
|
|
|
|
<Router history={hashHistory}>
|
|
|
|
<Route path="/" component={App}>
|
|
|
|
<IndexRedirect to="/features" />
|
|
|
|
<Route path="/features" component={Features} />
|
|
|
|
<Route path="/features/create" component={CreateFeatureToggle} />
|
|
|
|
<Route path="/features/edit/:name" component={EditFeatureToggle} />
|
|
|
|
<Route path="/strategies" component={Strategies} />
|
|
|
|
<Route path="/strategies/create" component={CreateStrategies} />
|
|
|
|
<Route path="/history" component={HistoryPage} />
|
2016-11-22 22:04:30 +01:00
|
|
|
<Route path="/history/:toggleName" component={HistoryTogglePage} />
|
2016-11-10 14:26:24 +01:00
|
|
|
<Route path="/archive" component={Archive} />
|
2016-12-03 15:54:15 +01:00
|
|
|
<Route path="/applications" component={Applications} />
|
2016-11-10 14:26:24 +01:00
|
|
|
<Route path="/client-strategies" component={ClientStrategies} />
|
|
|
|
</Route>
|
|
|
|
</Router>
|
|
|
|
</Provider>, document.getElementById('app'));
|