"use client"; import Link from "next/link"; import Image from "next/image"; import { useTranslations } from "next-intl"; import { Clock } from "lucide-react"; import { Badge } from "@/components/ui/badge"; type Suggestion = { id: string; title: string; photoUrl: string | null; usesExpiring: string[]; }; export function ExpiringSoonSuggestions({ suggestions }: { suggestions: Suggestion[] }) { const t = useTranslations("pantry"); if (suggestions.length === 0) return null; return (

{t("expiringSoonSuggestionsTitle")}

{t("seeAll")}
{suggestions.map((s) => ( {s.photoUrl ? (
{s.title}
) : (
)}

{s.title}

{s.usesExpiring.slice(0, 2).join(", ")}
))}
); }