From 7e16f500cb7bc0cfd8bafbf6bb1555704f771231 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 29 Apr 2022 12:13:34 +0200 Subject: chore: remove old pages, components, helpers and types Since I'm using new components, I will also rewrite the GraphQL queries so it is easier to start from scratch. --- src/ts/types/articles.ts | 102 ----------------------------------------------- 1 file changed, 102 deletions(-) delete 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 deleted file mode 100644 index 64d2860..0000000 --- a/src/ts/types/articles.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { ContentInfo, ContentParts, Dates } from './app'; -import { Comment } from './comments'; -import { Cover, RawCover } from './cover'; -import { SEO } from './seo'; -import { RawTopicPreview, TopicPreview, ThematicPreview } from './taxonomies'; - -export type ArticleAuthor = { - firstName: string; - lastName: string; - name: string; -}; - -export type RawACFPosts = { - postsInTopic: RawTopicPreview[] | null; - postsInThematic: ThematicPreview[] | null; -}; - -export type ACFPosts = { - postsInTopic: TopicPreview[] | null; - postsInThematic: ThematicPreview[] | null; -}; - -export type ArticleMeta = { - author?: ArticleAuthor; - commentCount?: number; - dates?: Dates; - readingTime?: number; - results?: number; - topics?: TopicPreview[]; - thematics?: ThematicPreview[]; - website?: string; - wordsCount?: number; -}; - -export type Article = { - author: ArticleAuthor; - commentCount: number | null; - content: string; - databaseId: number; - dates: Dates; - featuredImage: Cover; - id: string; - info: ContentInfo; - intro: string; - seo: SEO; - topics: TopicPreview[] | []; - thematics: ThematicPreview[] | []; - title: string; -}; - -export type RawArticle = Pick< - Article, - 'commentCount' | 'databaseId' | 'id' | 'info' | 'seo' | 'title' -> & { - acfPosts: RawACFPosts; - author: { node: ArticleAuthor }; - contentParts: ContentParts; - date: string; - featuredImage: RawCover; - modified: string; -}; - -export type ArticlePreview = Pick< - Article, - | 'commentCount' - | 'dates' - | 'id' - | 'info' - | 'intro' - | 'topics' - | 'thematics' - | 'title' -> & { featuredImage: Cover; slug: string }; - -export type RawArticlePreview = Pick< - Article, - 'commentCount' | 'id' | 'info' | 'title' -> & { - acfPosts: ACFPosts; - contentParts: Pick; - date: string; - featuredImage: RawCover; - modified: string; - slug: string; -}; - -export type PostBy = { - post: RawArticle; -}; - -export type ArticleProps = { - comments: Comment[]; - post: Article; -}; - -export type TotalArticles = { - posts: { - pageInfo: { - total: number; - }; - }; -}; -- cgit v1.2.3