forked from algorithm-visualizer/algorithm-visualizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
22 lines (20 loc) · 809 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import React from 'react';
import ReactDOM from 'react-dom';
import { combineReducers, createStore } from 'redux';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
import { Provider } from 'react-redux';
import { routerReducer } from 'react-router-redux';
import App from 'components/App';
import * as reducers from 'reducers';
import './stylesheet.scss';
const store = createStore(combineReducers({ ...reducers, routing: routerReducer }));
ReactDOM.render(
<Provider store={store}>
<BrowserRouter>
<Switch>
<Route exact path="/scratch-paper/:gistId" component={App}/>
<Route exact path="/:categoryKey/:algorithmKey" component={App}/>
<Route path="/" component={App}/>
</Switch>
</BrowserRouter>
</Provider>, document.getElementById('root'));