From a367f605b842ad0a71a63025da15ac62ed0364a5 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Tue, 21 Dec 2021 14:29:19 +0100
Subject: chore: add a breadcrumb component

---
 src/pages/blog/index.tsx | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

(limited to 'src/pages/blog/index.tsx')

diff --git a/src/pages/blog/index.tsx b/src/pages/blog/index.tsx
index 7d34763..23013bd 100644
--- a/src/pages/blog/index.tsx
+++ b/src/pages/blog/index.tsx
@@ -1,8 +1,7 @@
-import { ReactElement } from 'react';
 import { GetStaticProps } from 'next';
 import Head from 'next/head';
 import { t } from '@lingui/macro';
-import Layout from '@components/Layouts/Layout';
+import { getLayout } from '@components/Layouts/Layout';
 import { seo } from '@config/seo';
 import { config } from '@config/website';
 import { NextPageWithLayout } from '@ts/types/app';
@@ -62,9 +61,7 @@ const Blog: NextPageWithLayout<BlogPageProps> = ({ fallback }) => {
   );
 };
 
-Blog.getLayout = function getLayout(page: ReactElement) {
-  return <Layout>{page}</Layout>;
-};
+Blog.getLayout = getLayout;
 
 export const getStaticProps: GetStaticProps = async (context) => {
   const translation = await loadTranslation(
@@ -72,9 +69,11 @@ export const getStaticProps: GetStaticProps = async (context) => {
     process.env.NODE_ENV === 'production'
   );
   const data = await getPublishedPosts({ first: config.postsPerPage });
+  const breadcrumbTitle = t`Blog`;
 
   return {
     props: {
+      breadcrumbTitle,
       fallback: {
         '/api/posts': data,
       },
-- 
cgit v1.2.3

