feat: add i18n and avatar upload

This commit is contained in:
Vaka.pro
2026-04-26 22:16:59 +03:00
parent db41d4a246
commit 1b23097b18
22 changed files with 750 additions and 145 deletions

View File

@@ -1,6 +1,7 @@
import { Check, Sparkles, Archive, Trash2 } from 'lucide-react';
import type { Wish } from '@family-wishlist/shared';
import { cn } from '@/lib/cn';
import { useI18n } from '@/i18n/i18n';
interface Props {
wish: Wish & { isNewForOwner?: boolean };
@@ -9,6 +10,7 @@ interface Props {
}
export function WishBadges({ wish, view, className }: Props) {
const { t } = useI18n();
const badges: JSX.Element[] = [];
const isNew =
@@ -17,7 +19,7 @@ export function WishBadges({ wish, view, className }: Props) {
badges.push(
<span className="wish-badge wish-badge--new" key="new">
<Sparkles className="h-3 w-3" aria-hidden />
new
{t('wish.badge.new')}
</span>,
);
}
@@ -25,7 +27,7 @@ export function WishBadges({ wish, view, className }: Props) {
badges.push(
<span className="wish-badge wish-badge--completed" key="done">
<Check className="h-3 w-3" aria-hidden />
fulfilled
{t('wish.badge.fulfilled')}
</span>,
);
}
@@ -33,7 +35,7 @@ export function WishBadges({ wish, view, className }: Props) {
badges.push(
<span className="wish-badge wish-badge--archived" key="arch">
<Archive className="h-3 w-3" aria-hidden />
archived
{t('wish.badge.archived')}
</span>,
);
}
@@ -41,7 +43,7 @@ export function WishBadges({ wish, view, className }: Props) {
badges.push(
<span className="wish-badge wish-badge--deleted" key="del">
<Trash2 className="h-3 w-3" aria-hidden />
trash
{t('wish.badge.trash')}
</span>,
);
}