import type { BrowsableSourceItemView } from "@batch-cooking/shared"; import { useTranslation } from "react-i18next"; import "../recipes.scss"; /** * List of one source's browsable items (`RecipeSourcesPanel`) — same * "photo + name, click/Enter to select" row shape as `RecipeTable`, plus * an "already imported" badge in place of allergen/regime columns (a * source item has neither, it's not resolved against our catalogs until * previewed). */ export function SourceItemTable({ items, selectedExternalId, onSelect, }: { items: BrowsableSourceItemView[]; selectedExternalId: string | null; onSelect: (item: BrowsableSourceItemView) => void; }) { const { t } = useTranslation(); return (
| {t("recipes.table.name")} | ||
|---|---|---|
| {item.title} | {item.alreadyImported && ( {t("recipes.sources.alreadyImported")} )} |