-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
24 lines (19 loc) · 789 Bytes
/
App.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
import React from 'react'
import { Router, Route, browserHistory } from 'react-router'
import { createApp, renderApp } from '@phenomic/preset-react-app/lib/client'
import Html from './components/Html'
import PageError from './components/PageError'
import BlogPostContainer from './components/BlogPostContainer'
import HomeContainer from './components/HomeContainer'
const routes = () => (
<Router history={ browserHistory }>
<Route path="/" component={ HomeContainer } />
<Route path="/after/:after" component={ HomeContainer } />
<Route path="/blog/*" component={ BlogPostContainer } collection="posts" />
<Route path="*" component={PageError} />
</Router>
)
export default createApp(routes, Html)
if (module.hot) {
module.hot.accept(() => renderApp(routes))
}