diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-01-11 12:26:30 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-01-11 15:32:59 +0100 |
| commit | 9b8eced56f5e029bc92ad59b47cb9fd146b5e1d2 (patch) | |
| tree | b0e6088bc77bd676555925d5d85ebfcd71b14e12 /src/utils | |
| parent | 98dd62e28793bad9c121a9f16b11a10222a41c50 (diff) | |
chore(meta): display subjects instead of thematics on Thematic pages
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/helpers/format.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/utils/helpers/format.ts b/src/utils/helpers/format.ts index 44536dd..e628369 100644 --- a/src/utils/helpers/format.ts +++ b/src/utils/helpers/format.ts @@ -37,6 +37,7 @@ export const getFormattedPostPreview = (rawPost: RawArticlePreview) => { update: modified, }; + const subjects = acfPosts.postsInSubject ? acfPosts.postsInSubject : []; const thematics = acfPosts.postsInThematic ? acfPosts.postsInThematic : []; const formattedPost: ArticlePreview = { @@ -46,6 +47,7 @@ export const getFormattedPostPreview = (rawPost: RawArticlePreview) => { id, intro: contentParts.beforeMore, slug, + subjects, thematics, title, }; |
