From a3a4c50f26b8750ae1c87f1f1103b84b7d2e6315 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Tue, 14 Nov 2023 15:11:22 +0100
Subject: refactor(components): replace LinksListWidget with LinksWidget

* avoid List component repeat
* rewrite tests and CSS
* add an id to LinksWidgetItemData (previously LinksListItems) type
because the label could be duplicated
---
 src/components/templates/page/page-layout.stories.tsx | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

(limited to 'src/components/templates/page/page-layout.stories.tsx')

diff --git a/src/components/templates/page/page-layout.stories.tsx b/src/components/templates/page/page-layout.stories.tsx
index 9f0cce1..2b44933 100644
--- a/src/components/templates/page/page-layout.stories.tsx
+++ b/src/components/templates/page/page-layout.stories.tsx
@@ -1,6 +1,6 @@
 import type { ComponentMeta, ComponentStory } from '@storybook/react';
 import { ButtonLink, Heading, Link } from '../../atoms';
-import { LinksListWidget, PostsList, SharingWidget } from '../../organisms';
+import { LinksWidget, PostsList, SharingWidget } from '../../organisms';
 import { LayoutBase } from '../layout/layout.stories';
 import { PageLayout as PageLayoutComponent } from './page-layout';
 
@@ -457,13 +457,10 @@ const postsListBreadcrumb = [
 ];
 
 const blogCategories = [
-  { name: 'Cat 1', url: '#' },
-  {
-    name: 'Cat 2',
-    url: '#',
-  },
-  { name: 'Cat 3', url: '#' },
-  { name: 'Cat 4', url: '#' },
+  { id: 'cat1', label: 'Cat 1', url: '#' },
+  { id: 'cat2', label: 'Cat 2', url: '#' },
+  { id: 'cat3', label: 'Cat 3', url: '#' },
+  { id: 'cat4', label: 'Cat 4', url: '#' },
 ];
 
 const posts = [
@@ -503,7 +500,7 @@ Blog.args = {
   headerMeta: [{ id: 'total', label: 'Total:', value: `${posts.length}` }],
   children: <PostsList posts={posts} sortByYear />,
   widgets: [
-    <LinksListWidget
+    <LinksWidget
       heading={
         <Heading isFake level={3}>
           Categories
-- 
cgit v1.2.3

