feat(points): equipped looks on dashboard and public profile
Build, Test & Push Frontend / quality-check (push) Successful in 23s
Build, Test & Push Frontend / docker (push) Successful in 23s

Avatar borders frame the avatar on the dashboard, badges show next to the
heading, banner frames wrap the hero image, and equipped accents set the
color on both pages.
This commit is contained in:
lobo committed 2026-10-01 13:17:23 +02:00
1 parent ca3d34bad0
commit 0154202ddc
6 files changed
+112 -7

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
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 (
<span className={cn('inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium', badge.className, className)}>
<badge.Icon className="size-3.5"/>{t(`POINTS.ITEMS.${badge.code}`)}
</span>
);
}