From 0d59a6d2995b4119865271ed1908ede0bb96497c Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 9 May 2022 18:19:38 +0200 Subject: refactor: rewrite DescriptionList and Meta components The meta can have different layout. The previous implementation was not enough to easily change the layout. Also, I prefer to restrict the meta types and it prevents me to repeat myself for the labels. --- src/pages/index.tsx | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/pages/index.tsx') diff --git a/src/pages/index.tsx b/src/pages/index.tsx index c965320..6108d2f 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -225,17 +225,7 @@ const HomePage: NextPage = ({ recentPosts }) => { return { cover: post.cover, id: post.slug, - meta: [ - { - id: 'publication', - term: intl.formatMessage({ - defaultMessage: 'Published on:', - description: 'HomePage: publication date label', - id: 'pT5nHk', - }), - value: [post.dates.publication], - }, - ], + meta: { publication: { date: post.dates.publication } }, title: post.title, url: `/article/${post.slug}`, }; -- cgit v1.2.3