aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/templates/page/page-layout.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-10-10 19:37:51 +0200
committerArmand Philippot <git@armandphilippot.com>2023-11-11 18:14:41 +0100
commitc87c615b5866b8a8f361eeb0764bfdea85740e90 (patch)
treec27bda05fd96bbe3154472e170ba1abd5f9ea499 /src/components/templates/page/page-layout.tsx
parent15522ec9146f6f1956620355c44dea2a6a75b67c (diff)
refactor(components): replace Meta component with MetaList
It removes items complexity by allowing consumers to use any label/value association. Translations should also be defined by the consumer. Each item can now be configured separately (borders, layout...).
Diffstat (limited to 'src/components/templates/page/page-layout.tsx')
-rw-r--r--src/components/templates/page/page-layout.tsx10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/components/templates/page/page-layout.tsx b/src/components/templates/page/page-layout.tsx
index ee3fd3a..dbac43e 100644
--- a/src/components/templates/page/page-layout.tsx
+++ b/src/components/templates/page/page-layout.tsx
@@ -16,7 +16,6 @@ import { Heading, Notice, type NoticeKind, Sidebar } from '../../atoms';
import {
Breadcrumb,
type BreadcrumbItem,
- type MetaData,
PageFooter,
type PageFooterProps,
PageHeader,
@@ -41,13 +40,6 @@ const hasComments = (
): comments is SingleComment[] =>
Array.isArray(comments) && comments.length > 0;
-/**
- * Check if meta properties are defined.
- *
- * @param {MetaData} meta - The metadata.
- */
-const hasMeta = (meta: MetaData) => Object.values(meta).every((value) => value);
-
type CommentStatus = {
isReply: boolean;
kind: NoticeKind;
@@ -256,7 +248,7 @@ export const PageLayout: FC<PageLayoutProps> = ({
{children}
</div>
)}
- {footerMeta && hasMeta(footerMeta) ? (
+ {footerMeta?.length ? (
<PageFooter meta={footerMeta} className={styles.footer} />
) : null}
<Sidebar