import { Container, SectionHeading, LinkButton } from "@/components/ui"; import { ScrollReveal } from "@/components/scroll-reveal"; import { ContentImage } from "@/components/content-image"; import { ProductCard, TasteScale, AddToCartButton } from "@/components/product-card"; import { formatPrice, formatDate } from "@/lib/format"; import { getLocale } from "@/i18n/locale"; import { getDictionary } from "@/i18n/get-dictionary"; import { getContentValues, parseListSimple, parseListTitled } from "@/lib/content"; import type { ProductWithRelations } from "@/lib/data"; export async function CurrentHarvest({ products, reviewSummaries, }: { products: ProductWithRelations[]; reviewSummaries?: Map; }) { const t = getDictionary(await getLocale()); return (
{products.map((product) => ( ))}
); } export async function OriginStory() { const locale = await getLocale(); const t = getDictionary(locale); const content = await getContentValues( [ "home.originStory.paragraph1", "home.originStory.paragraph2", "home.originStory.facts", "home.originStory.image", ], locale ); const facts = parseListSimple(content["home.originStory.facts"]); return (

{content["home.originStory.paragraph1"]}

{content["home.originStory.paragraph2"]}

    {facts.map((fact) => (
  • {fact}
  • ))}
{t.home.originStory.cta}
); } export async function Philosophy() { const locale = await getLocale(); const t = getDictionary(locale); const content = await getContentValues(["home.philosophy.items"], locale); const items = parseListTitled(content["home.philosophy.items"]); return (
{items.map((item, i) => (
{String(i + 1).padStart(2, "0")}

{item.title}

{item.text}

))}
); } type HoneySpotlightProduct = ProductWithRelations & { harvest: NonNullable; batch: NonNullable; }; export async function ProductSpotlight({ product }: { product: HoneySpotlightProduct }) { const locale = await getLocale(); const t = getDictionary(locale); return (

{product.harvest.type} {product.harvest.year}

{product.name}

{t.home.productSpotlight.description}

{t.home.productSpotlight.consistency}: {product.consistency}

{t.home.productSpotlight.harvest}
{formatDate(product.harvest.harvestDate, locale)}
{t.home.productSpotlight.batch}
{product.batch.code}
{t.home.productSpotlight.weight}
{product.weightGrams} g
{t.home.productSpotlight.price}
{formatPrice(product.priceCents, product.currency, locale)}
{t.home.productSpotlight.cta}
); }