Skip to content

Commit a271858

Browse files
authored
fix(blog): hydration error on date (#8871)
SSR renders an en-US format date, client side renders in the user's locale
1 parent 8b8ae3d commit a271858

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: client/src/blog/post.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function TimeToRead({ readTime }: { readTime: number | undefined }) {
3636

3737
export function PublishDate({ date }: { date: string }) {
3838
return (
39-
<time className="date">
39+
<time className="date" suppressHydrationWarning>
4040
{Intl.DateTimeFormat(undefined, { dateStyle: "long" }).format(
4141
new Date(date)
4242
)}

0 commit comments

Comments
 (0)