From 0fa8ae55c52852c34c9143a6ec43c954c6404df1 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Wed, 15 Dec 2021 12:16:34 +0100 Subject: chore: retrieve posts list on blog page --- src/ts/types/articles.ts | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/ts/types/articles.ts (limited to 'src/ts/types/articles.ts') diff --git a/src/ts/types/articles.ts b/src/ts/types/articles.ts new file mode 100644 index 0000000..5d5fbc5 --- /dev/null +++ b/src/ts/types/articles.ts @@ -0,0 +1,38 @@ +import { Cover, CoverResponse } from './cover'; +import { SubjectPreview, ThematicPreview } from './taxonomies'; + +export type ArticleDates = { + publication: string; + update: string; +}; + +export type ArticlePreviewResponse = { + acfPosts: { + postsInSubject: SubjectPreview[] | null; + postsInThematics: ThematicPreview[] | null; + }; + commentCount: number; + contentParts: { + beforeMore: string; + }; + databaseId: number; + date: string; + featuredImage: CoverResponse | null; + id: string; + modified: string; + slug: string; + title: string; +}; + +export type ArticlePreview = { + commentCount: number; + content: string; + databaseId: number; + date: ArticleDates; + featuredImage?: Cover | object; + id: string; + slug: string; + subjects: SubjectPreview[] | []; + thematics: ThematicPreview[] | []; + title: string; +}; -- cgit v1.2.3