芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/app.optimyar.com/backend/.cache/admin/src/containers/HomePage/BlogPost.js
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);