This commit is contained in:
tangly1024.com
2023-06-30 14:28:15 +08:00
parent 96908a9290
commit 0f7e5f2fb9
26 changed files with 74 additions and 75 deletions

View File

@@ -19,7 +19,7 @@ export default function ArticleDetail(props) {
if (!post) {
return <></>
}
const date = formatDate(post?.publishTime || post?.createdTime, locale.LOCALE)
const date = formatDate(post?.publishTime, locale.LOCALE)
return (
<div id="container" className="max-w-5xl overflow-x-auto flex-grow mx-auto w-screen md:w-full ">
{post?.type && !post?.type !== 'Page' && post?.pageCover && (

View File

@@ -14,7 +14,7 @@ export default function HeaderArticle({ post, siteInfo }) {
const headerImage = post?.pageCover ? `url("${post.pageCover}")` : `url("${siteInfo?.pageCover}")`
const date = formatDate(
post?.publishTime || post?.createdTime,
post?.publishTime,
locale.LOCALE
)

View File

@@ -8,7 +8,7 @@ export const ArticleInfo = (props) => {
const { post } = props
const { locale } = useGlobal()
const date = formatDate(post?.publishTime || post?.createdTime, locale.LOCALE)
const date = formatDate(post?.publishTime, locale.LOCALE)
return (
<section className='mb-3 dark:text-gray-200'>

View File

@@ -20,7 +20,7 @@ export const LayoutSlug = props => {
const { locale } = useGlobal()
const date = formatDate(
post?.publishTime || post?.createdTime,
post?.publishTime,
locale.LOCALE
)
if (!post) {