- {post.title}
-
- {post.summary}
-diff --git a/components/BlogPostArchive.js b/components/BlogPostArchive.js new file mode 100644 index 00000000..c37b2722 --- /dev/null +++ b/components/BlogPostArchive.js @@ -0,0 +1,46 @@ +import React, { useRef } from 'react' +import Link from 'next/link' +import BLOG from '@/blog.config' +/** + * 博客归档列表 + * @param posts 所有文章 + * @param archiveTitle 归档标题 + * @returns {JSX.Element} + * @constructor + */ +const BlogPostArchive = ({ posts = [], archiveTitle }) => { + const targetRef = useRef(null) + if (!posts || posts.length === 0) { + return <>> + } else { + return
{post.summary}
-