aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/index.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-11-20 11:02:20 +0100
committerArmand Philippot <git@armandphilippot.com>2023-11-20 19:20:21 +0100
commitd5ade2359539648845a5854ed353b29367961d74 (patch)
tree45a49d90090408887135a971a7fd79c45d9dcd94 /src/pages/index.tsx
parent6ab9635a22d69186c8a24181ad5df7736e288577 (diff)
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.
Diffstat (limited to 'src/pages/index.tsx')
-rw-r--r--src/pages/index.tsx21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
index 0306736..d708ac5 100644
--- a/src/pages/index.tsx
+++ b/src/pages/index.tsx
@@ -25,6 +25,7 @@ import {
Section,
type SectionProps,
Time,
+ MetaItem,
} from '../components';
import HomePageContent from '../content/pages/homepage.mdx';
import { getArticlesCard } from '../services/graphql';
@@ -332,18 +333,14 @@ const HomePage: NextPageWithLayout<HomeProps> = ({ recentPosts }) => {
) : undefined
}
meta={
- <CardMeta
- hasBorderedValues
- hasInlinedValues
- isCentered
- items={[
- {
- id: 'publication-date',
- label: publicationDate,
- value: <Time date={post.dates.publication} />,
- },
- ]}
- />
+ <CardMeta isCentered>
+ <MetaItem
+ hasBorderedValues
+ isCentered
+ label={publicationDate}
+ value={<Time date={post.dates.publication} />}
+ />
+ </CardMeta>
}
isCentered
linkTo={`${ROUTES.ARTICLE}/${post.slug}`}