aboutsummaryrefslogtreecommitdiffstats
path: root/src/ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/ts')
-rw-r--r--src/ts/types/app.ts16
-rw-r--r--src/ts/types/homepage.ts12
-rw-r--r--src/ts/types/pages.ts23
3 files changed, 7 insertions, 44 deletions
diff --git a/src/ts/types/app.ts b/src/ts/types/app.ts
index e1d8917..2a1c9fc 100644
--- a/src/ts/types/app.ts
+++ b/src/ts/types/app.ts
@@ -5,8 +5,6 @@ import { PostBy } from './articles';
import { AllPostsSlug, RawPostsList } from './blog';
import { CommentData, CreateComment } from './comments';
import { ContactData, SendEmail } from './contact';
-import { HomePageBy } from './homepage';
-import { PageBy } from './pages';
import {
AllSubjectsSlug,
AllThematicsSlug,
@@ -30,11 +28,7 @@ export type AppPropsWithLayout = AppProps & {
// API
//==============================================================================
-export type VariablesType<T> = T extends
- | PageBy
- | PostBy
- | SubjectBy
- | ThematicBy
+export type VariablesType<T> = T extends PostBy | SubjectBy | ThematicBy
? Slug
: T extends RawPostsList
? CursorPagination
@@ -49,8 +43,6 @@ export type RequestType =
| AllSubjectsSlug
| AllThematicsSlug
| CreateComment
- | HomePageBy
- | PageBy
| PostBy
| SubjectBy
| ThematicBy
@@ -83,6 +75,12 @@ export type Heading = {
title: string;
};
+export type Meta = {
+ title: string;
+ publishedOn: string;
+ updatedOn: string;
+};
+
export type PageInfo = {
endCursor: string;
hasNextPage: boolean;
diff --git a/src/ts/types/homepage.ts b/src/ts/types/homepage.ts
deleted file mode 100644
index 8ff2ccb..0000000
--- a/src/ts/types/homepage.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-export type HomePage = {
- id: string;
- content: string;
-};
-
-export type HomePageBy = {
- nodeByUri: HomePage;
-};
-
-export type HomePageProps = {
- data: HomePage;
-};
diff --git a/src/ts/types/pages.ts b/src/ts/types/pages.ts
deleted file mode 100644
index 93ff62e..0000000
--- a/src/ts/types/pages.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { ContentParts, Dates } from './app';
-
-export type Page = {
- content: string;
- dates: Dates;
- intro: string;
- title: string;
-};
-
-export type RawPage = {
- contentParts: ContentParts;
- date: string;
- modified: string;
- title: string;
-};
-
-export type PageBy = {
- pageBy: RawPage;
-};
-
-export type PageProps = {
- page: Page;
-};