From 83144491ded4bb483bf74125794294c58b193b7e Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Tue, 15 Aug 2023 17:50:43 +0100 Subject: Pulls out NewsPreviewLink --- src/components/NewsPreviewLink.astro | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/components/NewsPreviewLink.astro (limited to 'src/components') diff --git a/src/components/NewsPreviewLink.astro b/src/components/NewsPreviewLink.astro new file mode 100644 index 0000000..99ecb60 --- /dev/null +++ b/src/components/NewsPreviewLink.astro @@ -0,0 +1,20 @@ +--- +import translate from '$i18n/translate'; +import tNewsPreviewLink from '$i18n/translations/components/newsPreviewLink'; +import type Locale from '$types/Locale'; +import type { CollectionEntry } from 'astro:content'; + +interface Props { + locale: Locale; + newsItem: CollectionEntry<'news'>; +} + +const { locale, newsItem } = Astro.props; +const t = translate(locale); +--- + + +

{newsItem.data.title}

+

{newsItem.data.summary}

+ +
-- cgit v1.2.3