diff --git a/web/src/components/detail/InfoView.astro b/web/src/components/detail/InfoView.astro index 0ef9e3e..413b8cb 100644 --- a/web/src/components/detail/InfoView.astro +++ b/web/src/components/detail/InfoView.astro @@ -1,29 +1,14 @@ --- import TagRow from "@component/tagRow"; - const { cookTime, prepTime, description, servings, rating, tags } = Astro.props - -function formatTimeMin(minutes: number) { - if (minutes === 0) return null - const h = Math.floor(minutes / 60); - const m = minutes % 60; - let result = ""; - if (h > 0) result += `${h}h`; - if (m > 0) result += `${m}m`; - if (result === "") result = "0m"; - return result; -} - -// const workTime = formatTimeMin(re.worktime) -// const waitTime = formatTimeMin(re.waittime) ---
{description}
Serves: {servings}
)} - {prepTime && ({prepTime} Prep
)} - {cookTime && ({cookTime} Cook
)} + {servings !== 0 && (Serves {servings}
)} + {prepTime && ({prepTime} prep
)} + {cookTime && ({cookTime} cook
)}• {ing.quantity.value.value} {ing.unit || ''} {ing.name}
+• {ing.quantity.value.value} {ing.unit || ''} {ing.name}{ing.preparation ? ` (${ing.preparation})` : ''}
• {i.quantity.value.value} {i.unit || ""} {i.name}
-