From 102121498b45ef221191401f6216260f072f78a9 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Wed, 15 Dec 2021 18:18:49 +0100 Subject: chore: create single post view --- src/ts/types/blog.ts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/ts/types/blog.ts') diff --git a/src/ts/types/blog.ts b/src/ts/types/blog.ts index 366231e..76eaedb 100644 --- a/src/ts/types/blog.ts +++ b/src/ts/types/blog.ts @@ -1,4 +1,8 @@ -import { ArticlePreview, ArticlePreviewResponse } from './articles'; +import { + ArticlePreview, + ArticlePreviewResponse, + ArticleSlug, +} from './articles'; import { PageInfo } from './pagination'; export type PostsListEdge = { @@ -18,7 +22,7 @@ export type PostsList = { pageInfo: PageInfo; }; -export type fetchPostsListReturn = ( +export type FetchPostsListReturn = ( first?: number, after?: string ) => Promise; @@ -28,8 +32,16 @@ type PostsListProps = { after?: string; }; -export type getPostsListReturn = (props: PostsListProps) => Promise; +export type GetPostsListReturn = (props: PostsListProps) => Promise; export type BlogPageProps = { fallback: PostsList; }; + +export type AllPostsSlugReponse = { + posts: { + nodes: ArticleSlug[]; + }; +}; + +export type FetchAllPostsSlugReturn = () => Promise; -- cgit v1.2.3