getHtml moved to Html component
This commit is contained in:
1 parent
81518fd57e
commit
9dc776f1b3
2 files changed
+13
-1
No files matched your search
@@ -0,0 +1,9 @@
|
||||
import React from 'react'
|
||||
|
||||
export default function Html(props) {
|
||||
return (
|
||||
<div dangerouslySetInnerHTML={{ __html: props.html }} />
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -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}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user