aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/nav/breadcrumbs/breadcrumbs.stories.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-12-12 18:50:03 +0100
committerArmand Philippot <git@armandphilippot.com>2023-12-12 18:50:03 +0100
commit85c4c42bd601270d7be0f34a0767a34bb85e29bb (patch)
tree16a07a89cf209139672592fd6988f0c028acb7e9 /src/components/organisms/nav/breadcrumbs/breadcrumbs.stories.tsx
parent93f87c10783e3d76f1dec667779aedffcae33a39 (diff)
refactor(hooks): rewrite useBreadcrumbs hook
* use next/router to get the slug instead of using props * handle cases where the current page title is not provided * update JSON-LD schema to match the example in documentation * add tests
Diffstat (limited to 'src/components/organisms/nav/breadcrumbs/breadcrumbs.stories.tsx')
-rw-r--r--src/components/organisms/nav/breadcrumbs/breadcrumbs.stories.tsx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/components/organisms/nav/breadcrumbs/breadcrumbs.stories.tsx b/src/components/organisms/nav/breadcrumbs/breadcrumbs.stories.tsx
index 4736b26..0b6fd27 100644
--- a/src/components/organisms/nav/breadcrumbs/breadcrumbs.stories.tsx
+++ b/src/components/organisms/nav/breadcrumbs/breadcrumbs.stories.tsx
@@ -28,7 +28,7 @@ const Template: ComponentStory<typeof Breadcrumbs> = (args) => (
*/
export const OneItem = Template.bind({});
OneItem.args = {
- items: [{ id: 'home', url: '#', name: 'Home' }],
+ items: [{ id: 'home', slug: '#', label: 'Home' }],
};
/**
@@ -37,8 +37,8 @@ OneItem.args = {
export const TwoItems = Template.bind({});
TwoItems.args = {
items: [
- { id: 'home', url: '#', name: 'Home' },
- { id: 'blog', url: '#', name: 'Blog' },
+ { id: 'home', slug: '#', label: 'Home' },
+ { id: 'blog', slug: '#', label: 'Blog' },
],
};
@@ -48,8 +48,8 @@ TwoItems.args = {
export const ThreeItems = Template.bind({});
ThreeItems.args = {
items: [
- { id: 'home', url: '#', name: 'Home' },
- { id: 'blog', url: '#', name: 'Blog' },
- { id: 'post1', url: '#', name: 'A Post' },
+ { id: 'home', slug: '#', label: 'Home' },
+ { id: 'blog', slug: '#', label: 'Blog' },
+ { id: 'post1', slug: '#', label: 'A Post' },
],
};