import {useTranslation} from 'react-i18next'; import {cn} from '@/lib/utils'; import {equippedBadge} from '../utils/rewards.js'; /** The badge worn from the points shop as a small pill; nothing when none is worn. */ export default function PointsBadge({equipped, className}) { const {t} = useTranslation(); const badge = equippedBadge(equipped); if (!badge) return null; return ( {t(`POINTS.ITEMS.${badge.code}`)} ); }