aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/index.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-12-24 15:38:37 +0100
committerArmand Philippot <git@armandphilippot.com>2021-12-24 15:38:37 +0100
commitef7912256cb4765d553b002c24b9752c2d5096ac (patch)
tree59b574dbda693dc5f1b2605272a6eff3b23802f2 /src/pages/index.tsx
parentfe5d74a864ddd1429b0753a3984c45b2392176d2 (diff)
parent0bb6411ee9fce02c2e5680f2be5740a1bbb508ad (diff)
feat: use mdx for pages
Diffstat (limited to 'src/pages/index.tsx')
-rw-r--r--src/pages/index.tsx10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
index 4146f34..3d4f6ff 100644
--- a/src/pages/index.tsx
+++ b/src/pages/index.tsx
@@ -4,18 +4,17 @@ import Head from 'next/head';
import Layout from '@components/Layouts/Layout';
import { seo } from '@config/seo';
import { NextPageWithLayout } from '@ts/types/app';
-import { HomePage, HomePageProps } from '@ts/types/homepage';
import { loadTranslation } from '@utils/helpers/i18n';
-import { getHomePage } from '@services/graphql/queries';
+import HomePageContent from '@content/pages/homepage.mdx';
-const Home: NextPageWithLayout<HomePageProps> = ({ data }) => {
+const Home: NextPageWithLayout = () => {
return (
<>
<Head>
<title>{seo.homepage.title}</title>
<meta name="description" content={seo.homepage.description} />
</Head>
- <div dangerouslySetInnerHTML={{ __html: data.content }}></div>
+ <HomePageContent />
</>
);
};
@@ -30,11 +29,8 @@ export const getStaticProps: GetStaticProps = async (ctx) => {
process.env.NODE_ENV === 'production'
);
- const data: HomePage = await getHomePage();
-
return {
props: {
- data,
translation,
},
};