fix/ build

This commit is contained in:
tangly1024.com
2023-06-07 15:47:31 +08:00
parent d98d1f4c4b
commit 93fd5b8fe3
17 changed files with 17 additions and 17 deletions

View File

@@ -21,7 +21,7 @@ const BlogPostArchive = ({ posts = [], archiveTitle }) => {
{archiveTitle}
</div>
<ul>
{posts.map(post => (
{posts?.map(post => (
<li
key={post.id}
className="border-l-2 p-1 text-xs md:text-base items-center hover:scale-x-105 hover:border-gray-500 dark:hover:border-gray-300 dark:border-gray-400 transform duration-500"

View File

@@ -21,7 +21,7 @@ const BlogPostListPage = ({ page = 1, posts = [], postCount }) => {
<div>
{/* 文章列表 */}
<div id="container" className="flex flex-wrap lg:space-y-4 space-y-1">
{posts.map(post => (
{posts?.map(post => (
<BlogPostCard key={post.id} post={post} />
))}
</div>

View File

@@ -25,7 +25,7 @@ const LatestPostsGroup = ({ latestPosts }) => {
{locale.COMMON.LATEST_POSTS}
</div>
</div>
{latestPosts.map(post => {
{latestposts?.map(post => {
const selected = currentPath === `${BLOG.SUB_PATH}/${post.slug}`
return (
(<Link

View File

@@ -16,7 +16,7 @@ const RecommendPosts = ({ recommendPosts }) => {
<div className="pt-2 border pl-4 py-2 my-4 dark:text-gray-300 ">
<div className="mb-2 font-bold text-lg">{locale.COMMON.RELATE_POSTS} :</div>
<ul className="font-light text-sm">
{recommendPosts.map(post => (
{recommendposts?.map(post => (
<li className="py-1" key={post.id}>
<Link href={`/${post.slug}`} className="cursor-pointer hover:underline">