aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/index.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-12-13 12:06:06 +0100
committerArmand Philippot <git@armandphilippot.com>2021-12-13 12:06:06 +0100
commit4cae14b9f86609b8c1f74d97a033e7091af49cb4 (patch)
treef5e81bde47b47947901a00307a47c36e3fc38ffd /src/pages/index.tsx
parent45335042c91c6bf5aa736658c461d54f96a6e0f2 (diff)
chore: change app to use a layout
I can now insert header/footer on each pages.
Diffstat (limited to 'src/pages/index.tsx')
-rw-r--r--src/pages/index.tsx10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
index da31f7d..6022497 100644
--- a/src/pages/index.tsx
+++ b/src/pages/index.tsx
@@ -1,9 +1,11 @@
-import type { NextPage } from 'next';
+import Layout from '@components/Layouts/Layout';
+import { NextPageWithLayout } from '@ts/types/app';
import Head from 'next/head';
import Image from 'next/image';
+import type { ReactElement } from 'react';
import styles from '../styles/Home.module.css';
-const Home: NextPage = () => {
+const Home: NextPageWithLayout = () => {
return (
<div className={styles.container}>
<Head>
@@ -69,4 +71,8 @@ const Home: NextPage = () => {
);
};
+Home.getLayout = function getLayout(page: ReactElement) {
+ return <Layout>{page}</Layout>;
+};
+
export default Home;