-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
41 lines (38 loc) · 1.06 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
38
39
40
41
import React, { Suspense } from 'react';
import {
Route,
Switch
} from 'react-router-dom'
import { blogRoutes } from "./routes"
import { Helmet } from 'react-helmet';
const BlogFrames = React.lazy(() => import('./JSComponent/blog/BlogFrames'));
function App() {
return (
<Suspense fallback={<div>Loading...</div>}>
<BlogFrames>
<Helmet>
<meta charSet="utf-8" />
<title>Blog | ModestFun的个人博客</title>
<link rel="icon" href="https://modestfun.com:8080/img/?name=logo" />
</Helmet>
<Switch>
{
blogRoutes.map(route => {
return (
<Route
key={route.path}
path={route.path}
exact={route.exact}
render={routeProps => {
return <route.component {...routeProps} />
}}></Route>
)
})
}
{/* <Redirect to="/404"></Redirect> */}
</Switch>
</BlogFrames>
</Suspense>
)
}
export default App;