From d5ade2359539648845a5854ed353b29367961d74 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 20 Nov 2023 11:02:20 +0100 Subject: refactor(components): extract MetaItem from MetaList * replace `items` prop on MetaList with `children` prop: it was too restrictive and the global options was not really useful. It is better too give control to the consumers. --- src/pages/projets/[slug].tsx | 54 +++++++++++++++++++++----------------------- src/pages/projets/index.tsx | 26 ++++++++++----------- 2 files changed, 38 insertions(+), 42 deletions(-) (limited to 'src/pages/projets') diff --git a/src/pages/projets/[slug].tsx b/src/pages/projets/[slug].tsx index 1aa9e7f..a8a4fea 100644 --- a/src/pages/projets/[slug].tsx +++ b/src/pages/projets/[slug].tsx @@ -19,12 +19,13 @@ import { List, ListItem, Figure, - type MetaItemData, Time, Grid, ProjectOverview, type ProjectMeta, type Repository, + MetaList, + MetaItem, } from '../../components'; import styles from '../../styles/pages/project.module.scss'; import type { NextPageWithLayout, ProjectPreview, Repos } from '../../types'; @@ -177,32 +178,6 @@ const ProjectPage: NextPageWithLayout = ({ project }) => { url: `${CONFIG.url}${asPath}`, }; - const headerMeta: (MetaItemData | undefined)[] = [ - { - id: 'publication-date', - label: intl.formatMessage({ - defaultMessage: 'Published on:', - description: 'ProjectsPage: publication date label', - id: 'HxZvY4', - }), - value: