This repository has been archived by the owner on Aug 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
62 lines (50 loc) · 1.46 KB
/
index.js
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import React from 'react'
import { render } from 'react-dom'
import { createStore, applyMiddleware, compose } from 'redux'
import { Provider } from 'react-redux'
import reduxThunk from 'redux-thunk'
import { withRouter } from 'react-router'
import { BrowserRouter as Router, Route, Redirect, Link } from 'react-router-dom'
import rootReducer from './reducers/rootReducer'
import HowToPlay from './components/HowToPlay'
import Start from './components/Start'
require('./styles/styles.css')
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
const store = createStore(rootReducer, composeEnhancers(applyMiddleware(reduxThunk)))
/*
store.subscribe(() => {
console.log(store.getState())
})
*/
const App = () => (
<div>
<Provider store={store}>
<Router>
<div>
<div className = "pagetitle">
<h1>Slideshow Karaoke</h1>
</div>
<ul className = "header">
<li>
<Link to = "/HowToPlay">
How To Play
</Link></li>
<li>
<Link to = "/Start">
Get Started
</Link></li>
</ul>
<div className = "content">
</div>
<div className = "footer">
</div>
<Route path = "/HowToPlay" component={HowToPlay} />
<Route path = "/Start" component={Start} />
<Route path = "/" render={() => <Redirect to="/HowToPlay" />} />
</div>
</Router>
</Provider>
</div>
)
render(<App />, document.getElementById('root'))
export default withRouter(App)