forked from punicasuite/punicasuite.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
37 lines (30 loc) · 1.15 KB
/
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
25
26
27
28
29
30
31
32
33
34
35
36
37
// @flow
import * as React from "react";
import { Router, Route, browserHistory } from "react-router";
import { createApp, renderApp } from "@phenomic/preset-react-app/lib/client";
import "./highlights-theme.css";
import Page from "./src/Page";
import PageBlog from "./src/PageBlog";
import PageBlogPost from "./src/PageBlogPost";
import PageError from "./src/PageError";
import PageBox from './src/PageBox'
import Docs from './src/Docs'
import ScList from './src/ScList'
const routes = () => (
<Router history={browserHistory}>
<Route path="/" component={Page} />
<Route path="/tutorials/" component={PageBlog} />
<Route path="/docs/*" component={Docs} />
<Route path="/scpm/" component={ScList} />
<Route path="/tutorials/after/:after" component={PageBlog} />
<Route path="/tutorials/*" component={PageBlogPost} />
<Route path="/boxes/" component={PageBox} />
{/* for static hosting, we often need an explicit 404.html */}
<Route path="404.html" component={PageError} />
<Route path="*" component={Page} />
</Router>
);
export default createApp(routes);
if (module.hot) {
module.hot.accept(() => renderApp(routes));
}