Skip to content

Commit 2607b6d

Browse files
authored
feat: add prop for custom breadcrumbs (#230)
1 parent 91089f5 commit 2607b6d

File tree

26 files changed

+15
-6
lines changed

26 files changed

+15
-6
lines changed
0 Bytes
Loading
1 Byte
Loading
137 Bytes
Loading
Loading
199 Bytes
Loading
11 Bytes
Loading

src/blocks/Header/Header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const breadcrumbsGoals = prepareAnalyticsEvent({
2929

3030
export const Header = (props: HeaderProps) => {
3131
const {theme, paddingTop, paddingBottom} = props;
32-
const {post} = useContext(PostPageContext);
32+
const {post, breadcrumbs: customBreadcrumbs = {}} = useContext(PostPageContext);
3333
const {locale} = useContext(LocaleContext);
3434
const {getBlogPath = getDefaultBlogPath} = useContext(SettingsContext);
3535
const blogPath = getBlogPath(locale.pathPrefix || '');
@@ -55,7 +55,7 @@ export const Header = (props: HeaderProps) => {
5555
{...props}
5656
title={title}
5757
description={description}
58-
breadcrumbs={breadcrumbs}
58+
breadcrumbs={{...breadcrumbs, ...customBreadcrumbs}}
5959
>
6060
<PostInfo
6161
postId={id}
25 Bytes
Loading
-19 Bytes
Loading
8 Bytes
Loading

0 commit comments

Comments
 (0)