Merge pull request #94 from madhura68/fix/idea-timeline-hydration-locale

fix(m12): hydration mismatch on IdeaTimeline timestamps
This commit is contained in:
Janpeter Visser 2026-05-05 13:45:02 +02:00 committed by GitHub
commit c6db766ff7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -100,7 +100,12 @@ export function IdeaTimeline({ logs, questions }: Props) {
return (
<ol className="border-l-2 border-input pl-4 space-y-3 ml-2">
{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') {
const type = entry.data.type as IdeaLogType