diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-12-13 16:42:50 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-12-13 16:52:33 +0100 |
| commit | 5bc55ac0a801cbe82c41a10f7e680612be4deaf8 (patch) | |
| tree | 9dbfada52bdc4750cca60e9bc8b8fd63cf9a4737 /src/ts | |
| parent | 8c836de71b47744ec3e99cb8b3c853528fa66b52 (diff) | |
chore: create homepage with graphql data
Diffstat (limited to 'src/ts')
| -rw-r--r-- | src/ts/types/app.ts | 2 | ||||
| -rw-r--r-- | src/ts/types/homepage.ts | 19 |
2 files changed, 20 insertions, 1 deletions
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<P = {}> = NextPage<P> & { 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<HomePageResponse>; + +export type HomePageResponse = { + nodeByUri: { + id: string; + content: string; + }; +}; + +export type getHomePageReturn = () => Promise<HomePage>; + +export type HomePage = { + id: string; + content: string; +}; + +export type HomePageProps = { + data: HomePage; +}; |
