getHtml moved to Html component

This commit is contained in:
tmshv committed 2019-05-30 18:49:11 +03:00
1 parent 81518fd57e
commit 9dc776f1b3
2 files changed
+13 -1

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
import React from 'react'
export default function Html(props) {
return (
<div dangerouslySetInnerHTML={{ __html: props.html }} />
)
}
+4 -1
View File
@@ -2,6 +2,7 @@ import React from 'react'
import {renderToStaticMarkup} from 'react-dom/server'
const App = require('../components/App')
const Html = require('../components/Html')
function renderApp({component, ...options}) {
const app = (
@@ -14,7 +15,9 @@ function renderApp({component, ...options}) {
function getHtml(html) {
return (
<div dangerouslySetInnerHTML={{__html: html}}/>
<Html
html={html}
/>
)
}