From 85c4c42bd601270d7be0f34a0767a34bb85e29bb Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Tue, 12 Dec 2023 18:50:03 +0100
Subject: 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
---
 src/components/templates/page/page.test.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/components/templates/page/page.test.tsx')

diff --git a/src/components/templates/page/page.test.tsx b/src/components/templates/page/page.test.tsx
index fb06cb1..afe93ce 100644
--- a/src/components/templates/page/page.test.tsx
+++ b/src/components/templates/page/page.test.tsx
@@ -24,8 +24,8 @@ describe('Page', () => {
     const body =
       'Consequatur deleniti eligendi quidem sint et nobis ut qui. Dolores modi eos. Cupiditate aliquid sunt consequatur voluptatem laudantium.';
     const breadcrumbs = [
-      { id: 'home', name: 'Home', url: '#home' },
-      { id: 'blog', name: 'Blog', url: '#blog' },
+      { id: 'home', label: 'Home', slug: '#home' },
+      { id: 'blog', label: 'Blog', slug: '#blog' },
     ] satisfies BreadcrumbsItem[];
 
     render(
-- 
cgit v1.2.3

