Merge pull request #94 from madhura68/fix/idea-timeline-hydration-locale
fix(m12): hydration mismatch on IdeaTimeline timestamps
This commit is contained in:
commit
c6db766ff7
1 changed files with 6 additions and 1 deletions
|
|
@ -100,7 +100,12 @@ export function IdeaTimeline({ logs, questions }: Props) {
|
||||||
return (
|
return (
|
||||||
<ol className="border-l-2 border-input pl-4 space-y-3 ml-2">
|
<ol className="border-l-2 border-input pl-4 space-y-3 ml-2">
|
||||||
{merged.map((entry, i) => {
|
{merged.map((entry, i) => {
|
||||||
const time = new Date(entry.created_at).toLocaleString()
|
// Expliciete locale + format om SSR/CSR hydration-mismatch te voorkomen
|
||||||
|
// (server-locale verschilde van browser-locale).
|
||||||
|
const time = new Date(entry.created_at).toLocaleString('nl-NL', {
|
||||||
|
dateStyle: 'short',
|
||||||
|
timeStyle: 'short',
|
||||||
|
})
|
||||||
|
|
||||||
if (entry.kind === 'log') {
|
if (entry.kind === 'log') {
|
||||||
const type = entry.data.type as IdeaLogType
|
const type = entry.data.type as IdeaLogType
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue