summaryrefslogtreecommitdiff
path: root/frontend/src/index.js
blob: d5190d531b8eb92a8de0a1504b5c02680dcb135e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import 'babel-polyfill'

import React from 'react'
import ReactDOM from 'react-dom'
import { Router, Route, IndexRoute } from 'react-router'
import { Provider } from 'react-redux'
import configureStore from './store'

const initialState = {}
const { store, history } = configureStore(initialState)

import './global-styles.css'
import HomePage from './containers/home'
import { LobbyLayout } from './layouts'
import GameBrowser from './containers/gameBrowser'
import Error404 from './components/errors/Error404'

ReactDOM.render(
  <Provider store={store}>
    <Router history={history}>
      <div className="app">
        <Route path="/" component={LobbyLayout}>
          <IndexRoute  component={HomePage} />
          <Route path="/games" component={GameBrowser} />
        </Route>
        <Route path="*" component={Error404} />
      </div>
    </Router>
  </Provider>,
  document.getElementById('root')
);
bgstack15