import { Star } from "@components/Stars.tsx"; import { IconArrowNarrowLeft, IconEdit, IconExternalLink, } from "@components/icons.tsx"; import Image from "@components/Image.tsx"; import { GenericResource } from "@lib/types.ts"; export function RecipeHero( { data, subline, backlink, editLink }: { backlink: string; subline?: (string | { title: string; href: string })[]; editLink?: string; data: GenericResource; }, ) { const { meta: { image } = {} } = data; return (
{image && ( Recipe Banner )}
Back {editLink && ( )}

{data.name} {data.meta?.link && ( )}

{data.meta?.rating && }
{subline?.length && (
{subline.filter((s) => s && (typeof s === "string" ? s?.length > 1 : true) ).map((s) => { if (typeof s === "string") { return {s}; } else { return {s.title}; } })}
)}
); }