--- import translate from '$i18n/translate'; import tComponent from '$i18n/translations/components/newsIndex'; import getLocaleFromPath from '$lib/getLocaleFromPath'; import type { CollectionEntry } from 'astro:content'; interface Props { headingLevel: 'h1' | 'h2' | 'h3' | 'h4'; newsItem: CollectionEntry<'news'>; } const { headingLevel, newsItem } = Astro.props; const locale = getLocaleFromPath(Astro.url.pathname); const t = translate(locale); --- ${newsItem.data.title} `} />

{newsItem.data.summary}