Make profile formatting hydration-safe

This commit is contained in:
test
2026-08-30 09:28:07 +02:00
parent 5db36cb29f
commit 71972afb87
9 changed files with 44 additions and 60 deletions
@@ -1,4 +1,5 @@
import React from 'react'
import { formatProfileDate } from '../../lib/profileFormatters'
import AchievementBadge from './AchievementBadge'
function cx(...parts) {
@@ -46,9 +47,9 @@ export default function AchievementCard({ achievement, className = '' }) {
{achievement?.unlocked_at ? (
<p className="mt-3 text-xs text-slate-500">
Unlocked {new Date(achievement.unlocked_at).toLocaleDateString()}
Unlocked {formatProfileDate(achievement.unlocked_at, { year: 'numeric', month: 'short', day: 'numeric' })}
</p>
) : null}
</article>
)
}
}