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/pages/[locale]/news/index.astro | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/pages') diff --git a/src/pages/[locale]/news/index.astro b/src/pages/[locale]/news/index.astro index 3e1b994..42a17e2 100644 --- a/src/pages/[locale]/news/index.astro +++ b/src/pages/[locale]/news/index.astro @@ -5,7 +5,7 @@ import Page from '$layouts/Page.astro'; import getLocaleFromPath from '$lib/getLocaleFromPath'; import localeStaticPaths from '$lib/localeStaticPaths'; import { getCollection } from 'astro:content'; -import relativePath from '$lib/relativePath'; +import NewsPreviewLink from '$components/NewsPreviewLink.astro'; const allNews = await getCollection('news'); const locale = getLocaleFromPath(Astro.url.pathname); @@ -29,16 +29,7 @@ export async function getStaticPaths() {
{ allNewsInLocale.length > 0 ? ( - allNewsInLocale.map((item) => ( - -

{item.data.title}

-

{item.data.summary}

- -
- )) + allNewsInLocale.map((item) => ) ) : (

{t(tPage, { key: 'no-news' })}

) -- cgit v1.2.3