'use client'; import { ACHIEVEMENTS } from '@ketopath/shared'; import { useTranslations } from 'next-intl'; import type { UnlockedAchievement } from './achievements-actions'; const ITALIAN_DATE = new Intl.DateTimeFormat('it-IT', { day: 'numeric', month: 'long', year: 'numeric', }); export function AchievementsPanel({ unlocked }: { unlocked: UnlockedAchievement[] }) { const t = useTranslations('Achievements'); const map = new Map(unlocked.map((u) => [u.key, u.unlockedAt])); const total = ACHIEVEMENTS.length; const got = unlocked.length; return (

{t('eyebrow')}

{t('title')}

{t('subtitle', { got, total })}

); }