From 368fbbf83b913b90cef9dfbe4288e148d589d033 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Sun, 23 Jan 2022 00:20:08 +0100 Subject: refactor: rename all subject occurrences into topic I change the name in graphql endpoint, so I decided to repercute this change here. --- src/ts/types/taxonomies.ts | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/ts/types/taxonomies.ts') diff --git a/src/ts/types/taxonomies.ts b/src/ts/types/taxonomies.ts index a0aaa5e..7d4ad3b 100644 --- a/src/ts/types/taxonomies.ts +++ b/src/ts/types/taxonomies.ts @@ -23,32 +23,32 @@ type TaxonomyPreview = Pick & { }; //============================================================================== -// Subjects +// Topics //============================================================================== -export type Subject = Taxonomy & { +export type Topic = Taxonomy & { featuredImage: Cover; officialWebsite: string; }; -export type RawSubjectPreview = TaxonomyPreview & { +export type RawTopicPreview = TaxonomyPreview & { featuredImage: RawCover; }; -export type SubjectPreview = TaxonomyPreview & { +export type TopicPreview = TaxonomyPreview & { featuredImage: Cover; }; -export type AllSubjects = { - subjects: { - nodes: SubjectPreview[]; +export type AllTopics = { + topics: { + nodes: TopicPreview[]; }; }; -export type RawSubject = SubjectPreview & { - acfSubjects: { +export type RawTopic = TopicPreview & { + acfTopics: { officialWebsite: string; - postsInSubject: RawArticlePreview[]; + postsInTopic: RawArticlePreview[]; }; contentParts: ContentParts; date: string; @@ -56,18 +56,18 @@ export type RawSubject = SubjectPreview & { modified: string; }; -export type SubjectBy = { - subjectBy: RawSubject; +export type TopicBy = { + topicBy: RawTopic; }; -export type AllSubjectsSlug = { - subjects: { +export type AllTopicsSlug = { + topics: { nodes: Slug[]; }; }; -export type SubjectProps = { - subject: Subject; +export type TopicProps = { + topic: Topic; }; //============================================================================== -- cgit v1.2.3