App.jsx
1 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
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 { Layout } from 'antd'
import routes from 'routes'
import Topbar from 'common/Topbar'
import Sidebar from 'common/Sidebar'
const { Content, Sider } = Layout
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>
{routes.map((route, index) => {
return <Route {...route} key={index + ''}/>
})}
</Switch>
</Content>
</Layout>
</Layout>
</Layout>
)
}
export default hot(module)(App)