Article server based
Required Sync changes!
This commit is contained in:
1 parent
6acb7ba64d
commit
be84058aba
18 files changed
+475
-114
No files matched your search
@@ -3,13 +3,20 @@ import {renderToStaticMarkup} from 'react-dom/server'
|
||||
|
||||
const App = require('../components/App')
|
||||
|
||||
function renderApp({menu, page}) {
|
||||
function renderApp({menu, component}) {
|
||||
const app = (
|
||||
<App menu={menu}>
|
||||
<div dangerouslySetInnerHTML={{__html: page.data}}/>
|
||||
{component}
|
||||
</App>
|
||||
)
|
||||
return renderToStaticMarkup(app)
|
||||
}
|
||||
|
||||
function getHtml(html) {
|
||||
return (
|
||||
<div dangerouslySetInnerHTML={{__html: html}}/>
|
||||
)
|
||||
}
|
||||
|
||||
exports.renderApp = renderApp
|
||||
exports.getHtml = getHtml
|
||||
Reference in new issue
Block a user