diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-12-24 15:38:37 +0100 | 
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-12-24 15:38:37 +0100 | 
| commit | ef7912256cb4765d553b002c24b9752c2d5096ac (patch) | |
| tree | 59b574dbda693dc5f1b2605272a6eff3b23802f2 /src/ts | |
| parent | fe5d74a864ddd1429b0753a3984c45b2392176d2 (diff) | |
| parent | 0bb6411ee9fce02c2e5680f2be5740a1bbb508ad (diff) | |
feat: use mdx for pages
Diffstat (limited to 'src/ts')
| -rw-r--r-- | src/ts/types/app.ts | 16 | ||||
| -rw-r--r-- | src/ts/types/homepage.ts | 12 | ||||
| -rw-r--r-- | src/ts/types/pages.ts | 23 | 
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; -}; | 
