Skip to content

Commit ea996d0

Browse files
authored
fix: upgrade design system and fix breadcrumb (#1093)
1 parent 04cb76e commit ea996d0

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"node": ">= 20.0"
3030
},
3131
"dependencies": {
32-
"@eleven-labs/design-system": "^0.35.0",
32+
"@eleven-labs/design-system": "^0.36.0",
3333
"@remix-run/router": "^1.7.2",
3434
"algoliasearch": "^4.19.1",
3535
"classnames": "^2.3.2",

src/hooks/useBreadcrumb.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';
44
import { PATHS } from '@/constants';
55
import { generatePath } from '@/helpers/routerHelper';
66

7-
export const useBreadcrumb = (options: { categoryName?: string }): BreadcrumbProps => {
7+
export const useBreadcrumb = (options: { categoryName?: string; withCategoryLink?: boolean }): BreadcrumbProps => {
88
const { t, i18n } = useTranslation();
99
return {
1010
items: [
@@ -14,6 +14,9 @@ export const useBreadcrumb = (options: { categoryName?: string }): BreadcrumbPro
1414
},
1515
{
1616
label: t(`common.categories.${options.categoryName ?? 'all'}`),
17+
href: options.withCategoryLink
18+
? generatePath(PATHS.CATEGORY, { lang: i18n.language, categoryName: options.categoryName ?? 'all' })
19+
: undefined,
1720
},
1821
],
1922
};

src/hooks/usePostPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const usePostPage = (post: PostPageData): Omit<PostPageProps, 'variant' |
4444
}, []);
4545

4646
const contactCard = useContactCard();
47-
const breadcrumb = useBreadcrumb({ categoryName: post.categories[0] });
47+
const breadcrumb = useBreadcrumb({ categoryName: post.categories[0], withCategoryLink: true });
4848
const relatedPostsForCardList = usePostsForCardList({
4949
posts: post.relatedPosts,
5050
imageFormatEnum: ImageFormatEnum.POST_CARD_COVER,

0 commit comments

Comments
 (0)