App.jsx
1.25 KB
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
import 'antd/dist/antd.css'
import 'common/index.scss'
import React from 'react'
import { Route, Link, Switch } from 'react-router-dom'
import { hot } from 'react-hot-loader'
import Loadable from 'react-loadable'
import { Layout } from 'antd'
import Topbar from 'common/Topbar'
import Sidebar from 'common/Sidebar'
const { Content, Sider } = Layout
function NoMatch() {
return <div>
Yoho Node.js 持续集成平台
</div>
}
function Loading() {
return <div>
Loading
</div>
}
const HotKeywords = Loadable({
loader: () => import('./pages/seo/HotKeywords'),
loading: Loading
})
function App () {
return (
<Layout className="layout">
<Topbar></Topbar>
<Layout className="main">
<Sider style={{background: '#fff'}}>
<Sidebar></Sidebar>
</Sider>
<Layout style={{padding: '24px'}}>
<Content style={{padding: '24px', background: '#fff'}}>
<Switch>
<Route exact path="/seo/hot-keyword" component={HotKeywords}/>
<Route component={NoMatch}/>
</Switch>
</Content>
</Layout>
</Layout>
</Layout>
)
}
export default hot(module)(App)