mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-01-26 05:22:28 +01:00
Fix Netlify CMS templates
This commit is contained in:
parent
f4e700d857
commit
1a7deacd3f
@ -1,13 +1,13 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
const PagePreview = ({ entry, widgetFor }) => {
|
const PagePreview = ({ entry, widgetFor }) => {
|
||||||
const body = widgetFor(['body']);
|
const body = widgetFor('body');
|
||||||
const title = entry.getIn(['data', 'title']);
|
const title = entry.getIn(['data', 'title']);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="page">
|
<div className="page">
|
||||||
<h1 className="page__title">{title}</h1>
|
<h1 className="page__title">{title}</h1>
|
||||||
<div className="page__body" dangerouslySetInnerHTML={{ __html: body }} />
|
<div className="page__body">{ body }</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
const PostPreview = ({ entry, widgetFor }) => {
|
const PostPreview = ({ entry, widgetFor }) => {
|
||||||
const body = widgetFor(['body']);
|
const body = widgetFor('body');
|
||||||
const title = entry.getIn(['data', 'title']);
|
const title = entry.getIn(['data', 'title']);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="post">
|
<div className="post">
|
||||||
<h1 className="post__title">{title}</h1>
|
<h1 className="post__title">{title}</h1>
|
||||||
<div className="post__body" dangerouslySetInnerHTML={{ __html: body }} />
|
<div className="post__body">{body}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user