Article server based

Required Sync changes!
This commit is contained in:
tmshv committed 2017-05-22 04:50:34 +03:00
1 parent 6acb7ba64d
commit be84058aba
18 files changed
+475 -114

No files matched your search

+9 -2
View File
@@ -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