import { WishCard } from '@/components/WishCard/WishCard'; import { useDeleteWish, useRestoreWish, useWishes, } from '@/features/wishes/wishes.hooks'; import { Archive } from 'lucide-react'; export function ArchivePage() { const { data, isLoading } = useWishes('archived'); const restore = useRestoreWish(); const remove = useDeleteWish(); return (

Archive

Wishes you put aside. Only you see this. Restore them to your active list any time.

{isLoading &&
Loading...
} {!isLoading && data && data.length === 0 && (

Archive is empty

Archived wishes will show up here.

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