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 {
useWishes,
} from '@/features/wishes/wishes.hooks';
import { Archive } from 'lucide-react';
import { useI18n } from '@/i18n/i18n';
export function ArchivePage() {
const { t } = useI18n();
const { data, isLoading } = useWishes('archived');
const restore = useRestoreWish();
const remove = useDeleteWish();
@@ -14,19 +16,19 @@ export function ArchivePage() {
return (
<div className="grid gap-6">
<section>
<h1 className="font-display text-3xl">Archive</h1>
<h1 className="font-display text-3xl">{t('archive.title')}</h1>
<p className="text-sm text-muted">
Wishes you put aside. Only you see this. Restore them to your active list any time.
{t('archive.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">
<Archive className="h-10 w-10 text-muted" />
<h2 className="text-xl font-semibold">Archive is empty</h2>
<p className="text-sm text-muted">Archived wishes will show up here.</p>
<h2 className="text-xl font-semibold">{t('archive.emptyTitle')}</h2>
<p className="text-sm text-muted">{t('archive.emptyText')}</p>
</div>
)}