Merge pull request #978 from pmndrs/fix/timestamp-hydration

Fix hydration warning on blog timestamp
This commit is contained in:
Timothy 2024-07-30 17:02:04 +08:00 committed by GitHub
commit f7d1e20cee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -129,7 +129,9 @@ export default function ListLayoutWithTags({
<dl>
<dt className="sr-only">Published on</dt>
<dd className="text-base font-medium leading-6 text-gray-500 dark:text-gray-400">
<time dateTime={date}>{formatDate(date, siteMetadata.locale)}</time>
<time dateTime={date} suppressHydrationWarning>
{formatDate(date, siteMetadata.locale)}
</time>
</dd>
</dl>
<div className="space-y-3">