"use client" import { Suspense } from "react" import { Header } from "@/components/layout/header" import { Skeleton } from "@/components/ui/skeleton" import { FlavorProfileCard } from "@/components/recommend/flavor-profile-card" import { SuggestSection } from "@/components/recommend/suggest-section" import { SimilarSection } from "@/components/recommend/similar-section" import { useFlavorProfile, useGenerateFlavorProfile, } from "@/hooks/use-recommend" import { useDrinks } from "@/hooks/use-drinks" import { Sparkles } from "lucide-react" export default function RecommendPage() { return ( }> ) } function RecommendLoading() { return (
) } function RecommendContent() { const { data: profileData, isLoading: profileLoading, error: profileError, } = useFlavorProfile() const generateProfile = useGenerateFlavorProfile() const { data: drinksData, isLoading: drinksLoading } = useDrinks({ limit: 500, sort: "name", }) const profile = profileData?.profile ?? null const hasProfile = !!profile const drinkOptions = (drinksData?.drinks ?? []).map((d) => ({ id: d.id, name: d.name, type: d.type, })) return (

Recommendations

AI-powered drink suggestions tailored to your taste.

generateProfile.mutate()} />
) }