From 5bc55ac0a801cbe82c41a10f7e680612be4deaf8 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 13 Dec 2021 16:42:50 +0100 Subject: chore: create homepage with graphql data --- src/ts/types/app.ts | 2 +- src/ts/types/homepage.ts | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src/ts/types/homepage.ts (limited to 'src/ts') diff --git a/src/ts/types/app.ts b/src/ts/types/app.ts index b663812..488fe6e 100644 --- a/src/ts/types/app.ts +++ b/src/ts/types/app.ts @@ -2,7 +2,7 @@ import { NextPage } from 'next'; import { AppProps } from 'next/app'; import { ReactElement, ReactNode } from 'react'; -export type NextPageWithLayout = NextPage & { +export type NextPageWithLayout

= NextPage

& { getLayout?: (page: ReactElement) => ReactNode; }; diff --git a/src/ts/types/homepage.ts b/src/ts/types/homepage.ts new file mode 100644 index 0000000..404aa38 --- /dev/null +++ b/src/ts/types/homepage.ts @@ -0,0 +1,19 @@ +export type fetchHomePageReturn = () => Promise; + +export type HomePageResponse = { + nodeByUri: { + id: string; + content: string; + }; +}; + +export type getHomePageReturn = () => Promise; + +export type HomePage = { + id: string; + content: string; +}; + +export type HomePageProps = { + data: HomePage; +}; -- cgit v1.2.3