import React, { memo } from 'react'; import PropTypes from 'prop-types'; import { LoadingBar } from 'strapi-helper-plugin'; const BlogPost = ({ error, isFirst, isLoading, title, content, link }) => { if (isLoading) { return ( <> ); } if (error) { return null; } return (

{title}

{content}

); }; BlogPost.defaultProps = { content: null, isFirst: false, link: null, title: null, }; BlogPost.propTypes = { content: PropTypes.string, error: PropTypes.bool.isRequired, isFirst: PropTypes.bool, isLoading: PropTypes.bool.isRequired, link: PropTypes.string, title: PropTypes.string, }; export default memo(BlogPost);