mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-29 15:10:06 +00:00
fix date
This commit is contained in:
@@ -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 && (
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
|
||||
@@ -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'>
|
||||
|
||||
@@ -20,7 +20,7 @@ export const LayoutSlug = props => {
|
||||
const { locale } = useGlobal()
|
||||
|
||||
const date = formatDate(
|
||||
post?.publishTime || post?.createdTime,
|
||||
post?.publishTime,
|
||||
locale.LOCALE
|
||||
)
|
||||
if (!post) {
|
||||
|
||||
Reference in New Issue
Block a user