From 2084d4334a567e414c29ed30bebeb6b6f4b61c6c Mon Sep 17 00:00:00 2001 From: Nathan Vasse Date: Tue, 22 Oct 2024 16:16:17 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5(front)=20remove=20communs=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need to remove this page for strategic reasons. --- src/pages/communs.tsx | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 src/pages/communs.tsx diff --git a/src/pages/communs.tsx b/src/pages/communs.tsx deleted file mode 100644 index 6dec1f6..0000000 --- a/src/pages/communs.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { GetStaticProps } from 'next' -import { type EntrySchema, collection } from '@/cms/collections/communs' -import { getFileEntry } from '@/cms/getEntry' -import { Layout } from '@/components/Layout' -import { CommunsContent } from '@/components/CommunsContent' - -export default function Communs({ data }: { data: EntrySchema }) { - return ( - - - - ) -} - -export const getStaticProps: GetStaticProps = async ({ - locale, - defaultLocale, -}) => { - const content = await getFileEntry(collection, locale) - - if ( - !!locale && - locale !== defaultLocale && - content.enabled_i18n[locale] === false - ) { - return { - notFound: true, - } - } - - return { - props: { - data: content, - }, - } -}