Make profile formatting hydration-safe
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user