aboutsummaryrefslogtreecommitdiffstats
path: root/src/services
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-12-01 17:59:30 +0100
committerArmand Philippot <git@armandphilippot.com>2023-12-01 18:06:46 +0100
commit11e3ee75fcab0ab54b2bc1713a402c5cc3070c2d (patch)
tree7cb478ac6b29f2b527eb3ec379b305b74dd4f0ba /src/services
parentdfdbf6cac1fe3719dc71e130129d28e04ba4e225 (diff)
refactor(pages): refine Topic pages
* add useTopic and useTopicsList hooks to refresh data * add a table of contents * add Cypress tests
Diffstat (limited to 'src/services')
-rw-r--r--src/services/graphql/helpers/convert-wp-topic-to-topic.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/services/graphql/helpers/convert-wp-topic-to-topic.ts b/src/services/graphql/helpers/convert-wp-topic-to-topic.ts
index f3ed4a9..60e5548 100644
--- a/src/services/graphql/helpers/convert-wp-topic-to-topic.ts
+++ b/src/services/graphql/helpers/convert-wp-topic-to-topic.ts
@@ -3,6 +3,7 @@ import { ROUTES } from '../../../utils/constants';
import {
getUniquePageLinks,
sortPageLinksByName,
+ updateContentTree,
} from '../../../utils/helpers';
import { convertPostPreviewToArticlePreview } from './convert-post-preview-to-article-preview';
import { convertWPThematicPreviewToPageLink } from './convert-taxonomy-to-page-link';
@@ -38,7 +39,7 @@ export const convertWPTopicToTopic = ({
title,
}: WPTopic): Topic => {
return {
- content: contentParts.afterMore,
+ content: updateContentTree(contentParts.afterMore),
id: databaseId,
intro: contentParts.beforeMore,
meta: {