Skip to content

Commit

Permalink
NXT-479 Add breadcrumb prop to cat landing
Browse files Browse the repository at this point in the history
  • Loading branch information
johndavey72 committed Nov 4, 2024
1 parent 2fd2154 commit 5c45bec
Showing 1 changed file with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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 (
<>
Expand All @@ -18,9 +19,16 @@ export const CategoryLandingPage = ({
blok.metadata?.map((nestedBlok) => (
<StoryblokComponent blok={nestedBlok} key={nestedBlok._uid} />
))}
{blok.header.map((nestedBlok) => (
<StoryblokComponent blok={nestedBlok} key={nestedBlok._uid} />
))}
{blok.header &&
blok.header.map((nestedBlok) => {
return (
<StoryblokComponent
blok={nestedBlok}
key={nestedBlok._uid}
breadcrumbs={breadcrumbs}
/>
);
})}
{/* {blok.content &&
blok.content.map((nestedBlok) => (
<StoryblokComponent blok={nestedBlok} key={nestedBlok._uid} />
Expand Down

0 comments on commit 5c45bec

Please sign in to comment.