forked from punicasuite/punicasuite.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHtml.js
More file actions
33 lines (31 loc) · 1.16 KB
/
Copy pathHtml.js
File metadata and controls
33 lines (31 loc) · 1.16 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
// @flow
import * as React from "react";
import Head from "react-helmet";
export default ({ App, render }: PhenomicHtmlPropsType) => {
// 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 (
// $FlowFixMe helmet is fine
<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()}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossOrigin="anonymous"/>
</head>
{/* // $FlowFixMe it works on my machine */}
<body {...helmet.bodyAttributes.toComponent()}>
<Main />
<State />
<Script />
</body>
</html>
);
};