fix post?.

This commit is contained in:
tangly1024.com
2023-07-11 18:28:16 +08:00
parent 47b3fa28e9
commit bb6b2b3e1d
10 changed files with 14 additions and 18 deletions

View File

@@ -1,5 +1,4 @@
import formatDate from '@/lib/formatDate'
import Image from 'next/image'
import BLOG from '@/blog.config'
import TagItem from './TagItem'
@@ -33,12 +32,9 @@ export const ArticleInfo = (props) => {
<span className="block">&nbsp;/&nbsp;</span>
</div>
<div className="mr-2 mb-4 md:ml-0">
{formatDate(
post?.publishTime || post?.createdTime,
BLOG.LANG
)}
{post?.publishTime}
</div>
{post.tags && (
{post?.tags && (
<div className="flex flex-nowrap max-w-full overflow-x-auto article-tags">
{post?.tags.map(tag => (
<TagItem key={tag} tag={tag} />