diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-23 19:32:42 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-05-23 20:53:58 +0200 |
| commit | c51b5d9a5f217f8aa59c4bdcb04eb3c87f5129b3 (patch) | |
| tree | a4ce7f77c2b1742119eebf818d9b97db7ed1e310 /src/components | |
| parent | 5ebd7c14f7303a0feb8ec1d902ecd0e287d929c3 (diff) | |
fix: ensure all topics/thematics have the base url
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/organisms/layout/posts-list.fixture.tsx | 8 | ||||
| -rw-r--r-- | src/components/organisms/layout/summary.fixture.tsx | 4 | ||||
| -rw-r--r-- | src/components/organisms/layout/summary.tsx | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/components/organisms/layout/posts-list.fixture.tsx b/src/components/organisms/layout/posts-list.fixture.tsx index b0afdf8..e3f2378 100644 --- a/src/components/organisms/layout/posts-list.fixture.tsx +++ b/src/components/organisms/layout/posts-list.fixture.tsx @@ -25,8 +25,8 @@ export const posts: Post[] = [ dates: { publication: '2022-02-26' }, wordsCount: introPost1.split(' ').length, thematics: [ - { id: 1, name: 'Cat 1', slug: '#' }, - { id: 2, name: 'Cat 2', slug: '#' }, + { id: 1, name: 'Cat 1', url: '#' }, + { id: 2, name: 'Cat 2', url: '#' }, ], commentsCount: 1, }, @@ -39,7 +39,7 @@ export const posts: Post[] = [ meta: { dates: { publication: '2022-02-20' }, wordsCount: introPost2.split(' ').length, - thematics: [{ id: 2, name: 'Cat 2', slug: '#' }], + thematics: [{ id: 2, name: 'Cat 2', url: '#' }], commentsCount: 0, }, title: 'Debitis laudantium laudantium', @@ -52,7 +52,7 @@ export const posts: Post[] = [ cover, dates: { publication: '2021-12-20' }, wordsCount: introPost3.split(' ').length, - thematics: [{ id: 1, name: 'Cat 1', slug: '#' }], + thematics: [{ id: 1, name: 'Cat 1', url: '#' }], commentsCount: 3, }, title: 'Quaerat ut corporis', diff --git a/src/components/organisms/layout/summary.fixture.tsx b/src/components/organisms/layout/summary.fixture.tsx index fbc46a5..bb3ebcb 100644 --- a/src/components/organisms/layout/summary.fixture.tsx +++ b/src/components/organisms/layout/summary.fixture.tsx @@ -14,8 +14,8 @@ export const meta: SummaryMeta = { dates: { publication: '2022-04-11' }, wordsCount: intro.split(' ').length, thematics: [ - { id: 1, name: 'Cat 1', slug: '#' }, - { id: 2, name: 'Cat 2', slug: '#' }, + { id: 1, name: 'Cat 1', url: '#' }, + { id: 2, name: 'Cat 2', url: '#' }, ], commentsCount: 1, }; diff --git a/src/components/organisms/layout/summary.tsx b/src/components/organisms/layout/summary.tsx index ca51cd6..8807878 100644 --- a/src/components/organisms/layout/summary.tsx +++ b/src/components/organisms/layout/summary.tsx @@ -83,12 +83,12 @@ const Summary: FC<SummaryProps> = ({ : undefined, readingTime, thematics: thematics?.map((thematic) => ( - <Link key={thematic.id} href={thematic.slug}> + <Link key={thematic.id} href={thematic.url}> {thematic.name} </Link> )), topics: topics?.map((topic) => ( - <Link key={topic.id} href={topic.slug}> + <Link key={topic.id} href={topic.url}> {topic.name} </Link> )), |
