"use client"; import { useState } from "react"; import Link from "next/link"; import { useTranslations, useLocale } from "next-intl"; import { ChefHat, PlusCircle, Utensils } from "lucide-react"; import { Button } from "@/components/ui/button"; import { BatchCookGenerateDialog } from "@/components/recipe/batch-cook-generate-dialog"; type Session = { id: string; title: string; description: string | null; baseServings: number; createdAt: string; dishCount: number; }; export function BatchCookingPageContent({ sessions }: { sessions: Session[] }) { const t = useTranslations("batchCooking"); const locale = useLocale(); const [open, setOpen] = useState(false); return (

{t("title")}

{t("subtitle")}

{sessions.length === 0 ? (

{t("empty")}

) : (
{sessions.map((s) => (

{s.title}

{s.description &&

{s.description}

}
{t("dishCount", { count: s.dishCount })} {new Date(s.createdAt).toLocaleDateString(locale)}
))}
)}
); }