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 7, 2024
1 parent b800d7a commit e338477
Showing 1 changed file with 12 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 @@ -19,9 +20,15 @@ export const CategoryLandingPage = ({
<StoryblokComponent blok={nestedBlok} key={nestedBlok._uid} />
))}
{blok.header &&
blok.header.map((nestedBlok) => (
<StoryblokComponent blok={nestedBlok} key={nestedBlok._uid} />
))}
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 e338477

Please sign in to comment.