aboutsummaryrefslogtreecommitdiffstats
path: root/src/ts/types/articles.ts
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-05-24 19:35:12 +0200
committerGitHub <noreply@github.com>2022-05-24 19:35:12 +0200
commitc85ab5ad43ccf52881ee224672c41ec30021cf48 (patch)
tree8058808d9bfca19383f120c46b34d99ff2f89f63 /src/ts/types/articles.ts
parent52404177c07a2aab7fc894362fb3060dff2431a0 (diff)
parent11b9de44a4b2f305a6a484187805e429b2767118 (diff)
refactor: use storybook and atomic design (#16)
BREAKING CHANGE: rewrite most of the Typescript types, so the content format (the meta in particular) needs to be updated.
Diffstat (limited to 'src/ts/types/articles.ts')
-rw-r--r--src/ts/types/articles.ts102
1 files changed, 0 insertions, 102 deletions
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<ContentParts, 'beforeMore'>;
- 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;
- };
- };
-};