From 5c45becc600f4fa074996aeb40f21f63ee81a0e7 Mon Sep 17 00:00:00 2001 From: John Davey Date: Mon, 4 Nov 2024 16:58:45 +0000 Subject: [PATCH] NXT-479 Add breadcrumb prop to cat landing --- .../CategoryLandingPage.tsx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/web/src/components/Storyblok/CategoryLandingPage/CategoryLandingPage.tsx b/web/src/components/Storyblok/CategoryLandingPage/CategoryLandingPage.tsx index a2e780ec..258333d0 100644 --- a/web/src/components/Storyblok/CategoryLandingPage/CategoryLandingPage.tsx +++ b/web/src/components/Storyblok/CategoryLandingPage/CategoryLandingPage.tsx @@ -1,15 +1,16 @@ import { StoryblokComponent } from "@storyblok/react"; +import { type Breadcrumb } from "@/types/Breadcrumb"; import { type CategoryLandingPageStoryblok } from "@/types/storyblok"; -// import styles from "./CategoryLandingPage.module.scss"; - export interface CategoryLandindPageBlokProps { blok: CategoryLandingPageStoryblok; + breadcrumbs?: Breadcrumb[]; } export const CategoryLandingPage = ({ blok, + breadcrumbs, }: CategoryLandindPageBlokProps): React.ReactElement => { return ( <> @@ -18,9 +19,16 @@ export const CategoryLandingPage = ({ blok.metadata?.map((nestedBlok) => ( ))} - {blok.header.map((nestedBlok) => ( - - ))} + {blok.header && + blok.header.map((nestedBlok) => { + return ( + + ); + })} {/* {blok.content && blok.content.map((nestedBlok) => (