"use client"; import Link from "next/link"; import Image from "next/image"; import { useTranslations, useLocale } from "next-intl"; import { Flame, ChefHat, History } from "lucide-react"; import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs"; import { getPublicUrl } from "@/lib/storage"; export type HistoryEntry = { id: string; recipeId: string; recipeTitle: string; cookedAt: string; servings: number | null; }; export type HistoryData = { totalCooked: number; streak: number; lastCooked: { recipeId: string; recipeTitle: string; cookedAt: string } | null; recentEntries: HistoryEntry[]; }; export type PhotoItem = { id: string; recipeId: string; recipeTitle: string; photoKey: string; createdAt: string; }; export type PhotosData = { items: PhotoItem[]; page: number; totalPages: number; total: number; }; function StatCard({ label, value }: { label: string; value: React.ReactNode }) { return (
{label}
{value}
{t("noHistoryYet")}
{photo.recipeTitle}
{t("noPhotosYet")}