-
Notifications
You must be signed in to change notification settings - Fork 58
/
view.js
40 lines (39 loc) · 1.25 KB
/
view.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
import React from 'react'
import Script from '../component/Script'
export default function Page(props) {
return (
<html>
<head>
<meta charSet="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui"
/>
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta
name="apple-mobile-web-app-status-bar-style"
content="black-translucent"
/>
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
<title>{props.title}</title>
<meta name="description" content={props.description} />
<meta name="keywords" content={props.keywords} />
</head>
<body>
<div id="root" dangerouslySetInnerHTML={{ __html: props.content }} />
<div id="modal" />
<Script>
{`
(function() {
window.__INITIAL_STATE__ = ${JSON.stringify(props.initialState)}
window.__APP_SETTINGS__ = ${JSON.stringify(props.appSettings)}
window.__PUBLIC_PATH__ = '${props.publicPath}'
})()
`}
</Script>
<script src={`${props.publicPath}/${props.assets.vendor}`} />
<script src={`${props.publicPath}/${props.assets.index}`} />
</body>
</html>
)
}