From 4b3b71a7e44a01550fe4d7c0be67b72aae109e73 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Thu, 16 Dec 2021 15:01:57 +0100 Subject: chore: fix typo --- src/services/graphql/blog.ts | 8 ++++---- src/ts/types/articles.ts | 2 +- src/ts/types/blog.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/services/graphql/blog.ts b/src/services/graphql/blog.ts index 127eb1e..6b92b5a 100644 --- a/src/services/graphql/blog.ts +++ b/src/services/graphql/blog.ts @@ -1,6 +1,6 @@ import { ArticlePreview } from '@ts/types/articles'; import { - AllPostsSlugReponse, + AllPostsSlugResponse, FetchAllPostsSlugReturn, FetchPostsListReturn, GetPostsListReturn, @@ -111,8 +111,8 @@ export const getPublishedPosts: GetPostsListReturn = async ({ ? acfPosts.postsInSubject : []; const thematics = - acfPosts.postsInThematics && acfPosts.postsInThematics?.length > 0 - ? acfPosts.postsInThematics + acfPosts.postsInThematic && acfPosts.postsInThematic?.length > 0 + ? acfPosts.postsInThematic : []; return { @@ -146,7 +146,7 @@ export const fetchAllPostsSlug: FetchAllPostsSlugReturn = async () => { `; try { - const response: AllPostsSlugReponse = await client.request(query); + const response: AllPostsSlugResponse = await client.request(query); return response.posts.nodes; } catch (error) { console.error(JSON.stringify(error, undefined, 2)); diff --git a/src/ts/types/articles.ts b/src/ts/types/articles.ts index 664e237..91703a2 100644 --- a/src/ts/types/articles.ts +++ b/src/ts/types/articles.ts @@ -11,7 +11,7 @@ export type ArticleDates = { export type ArticlePreviewResponse = { acfPosts: { postsInSubject: SubjectPreview[] | null; - postsInThematics: ThematicPreview[] | null; + postsInThematic: ThematicPreview[] | null; }; commentCount: number | null; contentParts: { diff --git a/src/ts/types/blog.ts b/src/ts/types/blog.ts index 76eaedb..32fa9b8 100644 --- a/src/ts/types/blog.ts +++ b/src/ts/types/blog.ts @@ -38,7 +38,7 @@ export type BlogPageProps = { fallback: PostsList; }; -export type AllPostsSlugReponse = { +export type AllPostsSlugResponse = { posts: { nodes: ArticleSlug[]; }; -- cgit v1.2.3