"use client"; import { useTranslations } from "next-intl"; import Link from "next/link"; import { ShoppingCart } from "lucide-react"; import { NewShoppingListButton } from "@/components/meal-plan/new-shopping-list-button"; type ShoppingListItem = { id: string; name: string; generatedAt: string | null; totalItems: number; checkedItems: number; }; type SharedListItem = { id: string; name: string; ownerName: string; role: "viewer" | "editor"; }; type Props = { lists: ShoppingListItem[]; sharedLists?: SharedListItem[]; }; export function ShoppingListsPageContent({ lists, sharedLists = [] }: Props) { const t = useTranslations("shoppingLists"); const ts = useTranslations("shareDialog"); return (
{t("subtitle")}
{t("empty")}
{list.totalItems === 0 ? t("listEmpty") : t("items", { checked: list.checkedItems, total: list.totalItems })} {list.generatedAt && ` · ${t("generated")}`}
{list.ownerName} · {ts(list.role)}