diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-01-03 12:24:04 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-01-03 12:24:04 +0100 |
| commit | 04a1ceb257311a98fffc4b18679f73789b920e09 (patch) | |
| tree | 96bccf0152fcc2c3c49762ded83eaf0e57993bf0 /src/ts | |
| parent | a98b5ea6fe8e8cc98a55e0fd793e6e8660ea31c1 (diff) | |
chore: display subjects list under articles
Diffstat (limited to 'src/ts')
| -rw-r--r-- | src/ts/types/articles.ts | 13 | ||||
| -rw-r--r-- | src/ts/types/taxonomies.ts | 4 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/ts/types/articles.ts b/src/ts/types/articles.ts index e6a40ef..dc5bbe4 100644 --- a/src/ts/types/articles.ts +++ b/src/ts/types/articles.ts @@ -2,7 +2,11 @@ import { ContentParts, Dates } from './app'; import { Comment, CommentsNode } from './comments'; import { Cover, RawCover } from './cover'; import { SEO } from './seo'; -import { SubjectPreview, ThematicPreview } from './taxonomies'; +import { + RawSubjectPreview, + SubjectPreview, + ThematicPreview, +} from './taxonomies'; export type ArticleAuthor = { firstName: string; @@ -10,6 +14,11 @@ export type ArticleAuthor = { name: string; }; +export type RawACFPosts = { + postsInSubject: RawSubjectPreview[] | null; + postsInThematic: ThematicPreview[] | null; +}; + export type ACFPosts = { postsInSubject: SubjectPreview[] | null; postsInThematic: ThematicPreview[] | null; @@ -34,7 +43,7 @@ export type RawArticle = Pick< Article, 'commentCount' | 'databaseId' | 'id' | 'seo' | 'title' > & { - acfPosts: ACFPosts; + acfPosts: RawACFPosts; author: { node: ArticleAuthor }; comments: CommentsNode; contentParts: ContentParts; diff --git a/src/ts/types/taxonomies.ts b/src/ts/types/taxonomies.ts index 3945934..71eb20a 100644 --- a/src/ts/types/taxonomies.ts +++ b/src/ts/types/taxonomies.ts @@ -29,6 +29,10 @@ export type Subject = Taxonomy & { officialWebsite: string; }; +export type RawSubjectPreview = TaxonomyPreview & { + featuredImage: RawCover; +}; + export type SubjectPreview = TaxonomyPreview & { featuredImage: Cover; }; |
