diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-01-07 12:33:35 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-01-07 12:34:34 +0100 |
| commit | b405ddb76f217ccf7828b422ec4c0f0e15b7dee4 (patch) | |
| tree | b6313b139f018f09d9bb88dedb7c5b3e4d84ef76 /src/ts | |
| parent | b4e12398fbeb642c12649dcccdf4d5cdefa471e3 (diff) | |
chore: add a widget to list all blog topics
Diffstat (limited to 'src/ts')
| -rw-r--r-- | src/ts/types/app.ts | 2 | ||||
| -rw-r--r-- | src/ts/types/taxonomies.ts | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/ts/types/app.ts b/src/ts/types/app.ts index 7220ddd..d9bd041 100644 --- a/src/ts/types/app.ts +++ b/src/ts/types/app.ts @@ -6,6 +6,7 @@ import { AllPostsSlug, RawPostsList } from './blog'; import { CommentData, CreateComment } from './comments'; import { ContactData, SendEmail } from './contact'; import { + AllSubjects, AllSubjectsSlug, AllThematics, AllThematicsSlug, @@ -41,6 +42,7 @@ export type VariablesType<T> = T extends PostBy | SubjectBy | ThematicBy export type RequestType = | AllPostsSlug + | AllSubjects | AllSubjectsSlug | AllThematics | AllThematicsSlug diff --git a/src/ts/types/taxonomies.ts b/src/ts/types/taxonomies.ts index 32e1f15..0b2d696 100644 --- a/src/ts/types/taxonomies.ts +++ b/src/ts/types/taxonomies.ts @@ -37,6 +37,12 @@ export type SubjectPreview = TaxonomyPreview & { featuredImage: Cover; }; +export type AllSubjects = { + subjects: { + nodes: SubjectPreview[]; + }; +}; + export type RawSubject = SubjectPreview & { acfSubjects: { officialWebsite: string; @@ -58,6 +64,10 @@ export type AllSubjectsSlug = { }; }; +export type SubjectProps = { + subject: Subject; +}; + //============================================================================== // Thematics //============================================================================== @@ -91,10 +101,6 @@ export type AllThematicsSlug = { }; }; -export type SubjectProps = { - subject: Subject; -}; - export type ThematicProps = { thematic: Thematic; }; |
