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

@@ -5,8 +5,10 @@ import {
useDuplicateWish,
useWishes,
} from '@/features/wishes/wishes.hooks';
import { useI18n } from '@/i18n/i18n';
export function CompletedPage() {
const { t } = useI18n();
const { data, isLoading } = useWishes('completed');
const duplicate = useDuplicateWish();
const remove = useDeleteWish();
@@ -14,20 +16,20 @@ export function CompletedPage() {
return (
<div className="grid gap-6">
<section>
<h1 className="font-display text-3xl">Fulfilled</h1>
<h1 className="font-display text-3xl">{t('completed.title')}</h1>
<p className="text-sm text-muted">
Wishes you've received. You can create a new wish based on any of them.
{t('completed.description')}
</p>
</section>
{isLoading && <div className="text-muted">Loading...</div>}
{isLoading && <div className="text-muted">{t('common.loading')}</div>}
{!isLoading && data && data.length === 0 && (
<div className="flex flex-col items-center gap-2 rounded-xl border border-border bg-surface/80 p-10 text-center shadow-card">
<CheckCircle2 className="h-10 w-10 text-muted" />
<h2 className="text-xl font-semibold">Nothing fulfilled yet</h2>
<h2 className="text-xl font-semibold">{t('completed.emptyTitle')}</h2>
<p className="text-sm text-muted">
When a wish comes true, mark it as fulfilled and it lands here.
{t('completed.emptyText')}
</p>
</div>
)}