-
Notifications
You must be signed in to change notification settings - Fork 0
/
Html.js
31 lines (29 loc) · 862 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
30
31
import React from "react"
import Head from "react-helmet"
const Html = (props) => {
const helmet = Head.renderStatic()
return (
<html { ...helmet.htmlAttributes.toComponent() }>
<head>
{helmet.base.toComponent()}
{helmet.title.toComponent()}
{helmet.meta.toComponent()}
{helmet.link.toComponent()}
{helmet.style.toComponent()}
{helmet.script.toComponent()}
{helmet.noscript.toComponent()}
</head>
<body { ...helmet.bodyAttributes.toComponent() }>
{ /* phenomic html output */}
<h1> test </h1>
{ props.body }
{ /* phenomic current state, as json */}
{ /* required so sync static/client rendering */}
{ props.state }
{ /* phenomic entry script */}
{ props.script }
</body>
</html>
)
}
export default Html