aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages')
-rw-r--r--src/pages/cv.tsx48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/pages/cv.tsx b/src/pages/cv.tsx
new file mode 100644
index 0000000..5b913f3
--- /dev/null
+++ b/src/pages/cv.tsx
@@ -0,0 +1,48 @@
+import Layout from '@components/Layouts/Layout';
+import { seo } from '@config/seo';
+import { getCVPage } from '@services/graphql/pages';
+import { NextPageWithLayout } from '@ts/types/app';
+import { PageProps } from '@ts/types/pages';
+import { loadTranslation } from '@utils/helpers/i18n';
+import { GetStaticProps, GetStaticPropsContext } from 'next';
+import Head from 'next/head';
+import { ReactElement } from 'react';
+
+const CV: NextPageWithLayout<PageProps> = ({ page }) => {
+ return (
+ <>
+ <Head>
+ <title>{seo.cv.title}</title>
+ <meta name="description" content={seo.cv.description} />
+ </Head>
+ <article>
+ <header>
+ <h1>{page.title}</h1>
+ <div dangerouslySetInnerHTML={{ __html: page.intro }}></div>
+ </header>
+ <div dangerouslySetInnerHTML={{ __html: page.content }}></div>
+ </article>
+ </>
+ );
+};
+
+CV.getLayout = (page: ReactElement) => <Layout>{page}</Layout>;
+
+export const getStaticProps: GetStaticProps = async (
+ context: GetStaticPropsContext
+) => {
+ const translation = await loadTranslation(
+ context.locale!,
+ process.env.NODE_ENV === 'production'
+ );
+ const page = await getCVPage();
+
+ return {
+ props: {
+ page,
+ translation,
+ },
+ };
+};
+
+export default CV;