From 43f1fc3ce52e6ddd397853964c8868f2f4eee41d Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Sun, 13 Feb 2022 18:15:07 +0100 Subject: chore: improve RSS feed generation time --- src/ts/types/app.ts | 9 +++++---- src/ts/types/articles.ts | 8 ++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'src/ts') diff --git a/src/ts/types/app.ts b/src/ts/types/app.ts index 2c9a291..3edc8a0 100644 --- a/src/ts/types/app.ts +++ b/src/ts/types/app.ts @@ -1,7 +1,7 @@ import { NextPage } from 'next'; import { AppProps } from 'next/app'; import { ReactElement, ReactNode } from 'react'; -import { PostBy } from './articles'; +import { PostBy, TotalArticles } from './articles'; import { AllPostsSlug, RawPostsList } from './blog'; import { CommentData, CreateComment } from './comments'; import { ContactData, SendEmail } from './contact'; @@ -48,10 +48,11 @@ export type RequestType = | AllThematicsSlug | CreateComment | PostBy - | TopicBy - | ThematicBy | RawPostsList - | SendEmail; + | SendEmail + | ThematicBy + | TopicBy + | TotalArticles; //============================================================================== // Globals diff --git a/src/ts/types/articles.ts b/src/ts/types/articles.ts index 5281e7e..75e5a1a 100644 --- a/src/ts/types/articles.ts +++ b/src/ts/types/articles.ts @@ -93,3 +93,11 @@ export type PostBy = { export type ArticleProps = { post: Article; }; + +export type TotalArticles = { + posts: { + pageInfo: { + total: number; + }; + }; +}; -- cgit v1.2.3