import { WishCard } from '@/components/WishCard/WishCard'; import { useDeleteWish, useRestoreWish, 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(); return (

{t('archive.title')}

{t('archive.description')}

{isLoading &&
{t('common.loading')}
} {!isLoading && data && data.length === 0 && (

{t('archive.emptyTitle')}

{t('archive.emptyText')}

)} {data && data.length > 0 && (
{data.map((wish) => ( restore.mutate(wish.id)} onDelete={() => remove.mutate(wish.id)} /> ))}
)}
); }