Fix Netlify CMS templates

This commit is contained in:
alxshelepenok 2019-01-21 15:32:18 +03:00
parent f4e700d857
commit 1a7deacd3f
2 changed files with 4 additions and 4 deletions

View File

@ -1,13 +1,13 @@
import React from 'react';
const PagePreview = ({ entry, widgetFor }) => {
const body = widgetFor(['body']);
const body = widgetFor('body');
const title = entry.getIn(['data', 'title']);
return (
<div className="page">
<h1 className="page__title">{title}</h1>
<div className="page__body" dangerouslySetInnerHTML={{ __html: body }} />
<div className="page__body">{ body }</div>
</div>
);
};

View File

@ -1,13 +1,13 @@
import React from 'react';
const PostPreview = ({ entry, widgetFor }) => {
const body = widgetFor(['body']);
const body = widgetFor('body');
const title = entry.getIn(['data', 'title']);
return (
<div className="post">
<h1 className="post__title">{title}</h1>
<div className="post__body" dangerouslySetInnerHTML={{ __html: body }} />
<div className="post__body">{body}</div>
</div>
);
};