import { useActionQuery } from "@agent-native/core/client/hooks"; import { IconHeart } from "@tabler/icons-react"; import { QuoteCard } from "@/components/quotes/QuoteCard"; import { Skeleton } from "@/components/ui/skeleton"; import { useVisitorId } from "@/lib/visitor-id"; export function meta() { return [{ title: "Favorites — Verse" }]; } export function HydrateFallback() { return (
); } export default function FavoritesRoute() { const visitorId = useVisitorId(); const { data: quotes, isLoading } = useActionQuery( "list-favorites", { visitorId }, { enabled: Boolean(visitorId) }, ); return (

Favorites

Quotes you've saved on this device.

{isLoading ? (
{Array.from({ length: 2 }).map((_, i) => ( ))}
) : !quotes || quotes.length === 0 ? (

No favorites yet — tap the heart on any quote to save it here.

) : (
{quotes.map((quote) => ( ))}
)}
); }