diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-12-15 18:18:49 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-12-15 18:18:49 +0100 |
| commit | 102121498b45ef221191401f6216260f072f78a9 (patch) | |
| tree | fb9ef1e648929b24bdbeefc719b5831458ef1a4b /src/ts/types/blog.ts | |
| parent | 0bc323a777a607090af87636026f668104cf8a0c (diff) | |
chore: create single post view
Diffstat (limited to 'src/ts/types/blog.ts')
| -rw-r--r-- | src/ts/types/blog.ts | 18 |
1 files changed, 15 insertions, 3 deletions
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<PostsListResponse>; @@ -28,8 +32,16 @@ type PostsListProps = { after?: string; }; -export type getPostsListReturn = (props: PostsListProps) => Promise<PostsList>; +export type GetPostsListReturn = (props: PostsListProps) => Promise<PostsList>; export type BlogPageProps = { fallback: PostsList; }; + +export type AllPostsSlugReponse = { + posts: { + nodes: ArticleSlug[]; + }; +}; + +export type FetchAllPostsSlugReturn = () => Promise<ArticleSlug[]>; |
