forked from parisjs/parisjs-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Html.js
29 lines (28 loc) · 920 Bytes
/
Html.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
import * as React from 'react'
import Head from 'react-helmet'
export default ({ App, render }) => {
// if needed, you can know if you are in development or in static rendering
// const isDev = process.env.PHENOMIC_ENV === "development"
const { Main, State, Script, Style } = render(<App />)
const helmet = Head.renderStatic()
return (
<html {...helmet.htmlAttributes.toComponent()}>
<head>
{helmet.meta.toComponent()}
{helmet.title.toComponent()}
{helmet.base.toComponent()}
<Style />
{helmet.link.toComponent()}
{helmet.style.toComponent()}
{helmet.script.toComponent()}
{helmet.noscript.toComponent()}
<script src="https://unpkg.com/[email protected]/dist/hello.all.js" />
</head>
<body {...helmet.bodyAttributes.toComponent()}>
<Main />
<State />
<Script />
</body>
</html>
)
}