From 85e40049ac92092b7e94b4e7fd5c73a181ce2c48 Mon Sep 17 00:00:00 2001 From: Augustin Mauroy Date: Thu, 12 Sep 2024 20:47:19 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20flex=20col=20=E2=89=A0=20flex=20row?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/site/app/[locale]/error.tsx | 6 +++--- apps/site/app/[locale]/not-found.tsx | 6 +++--- apps/site/app/global-error.tsx | 6 +++--- apps/site/components/withLayout.tsx | 4 ++-- .../layouts/{Home.tsx => GlowingBackdrop.tsx} | 20 ++++++++++++++++--- 5 files changed, 28 insertions(+), 14 deletions(-) rename apps/site/layouts/{Home.tsx => GlowingBackdrop.tsx} (50%) diff --git a/apps/site/app/[locale]/error.tsx b/apps/site/app/[locale]/error.tsx index f1a4ceb08e500..74bea0d0e2f71 100644 --- a/apps/site/app/[locale]/error.tsx +++ b/apps/site/app/[locale]/error.tsx @@ -6,14 +6,14 @@ import { useTranslations } from 'next-intl'; import type { FC } from 'react'; import Button from '@/components/Common/Button'; -import HomeLayout from '@/layouts/Home'; +import GlowingBackdropLayout from '@/layouts/GlowingBackdrop'; const ErrorPage: FC<{ error: Error }> = ({ error }) => { captureException(error); const t = useTranslations(); return ( - + 500

{t('layouts.error.internalServerError.title')} @@ -25,7 +25,7 @@ const ErrorPage: FC<{ error: Error }> = ({ error }) => { {t('layouts.error.backToHome')} - + ); }; diff --git a/apps/site/app/[locale]/not-found.tsx b/apps/site/app/[locale]/not-found.tsx index 6ecf75a855d7e..b04dd42c1d2a1 100644 --- a/apps/site/app/[locale]/not-found.tsx +++ b/apps/site/app/[locale]/not-found.tsx @@ -6,13 +6,13 @@ import { useTranslations } from 'next-intl'; import type { FC } from 'react'; import Button from '@/components/Common/Button'; -import HomeLayout from '@/layouts/Home'; +import GlowingBackdropLayout from '@/layouts/GlowingBackdrop'; const NotFoundPage: FC = () => { const t = useTranslations(); return ( - + 404

{t('layouts.error.notFound.title')}

@@ -30,7 +30,7 @@ const NotFoundPage: FC = () => { {t('layouts.error.backToHome')} - + ); }; diff --git a/apps/site/app/global-error.tsx b/apps/site/app/global-error.tsx index bd1e04d1fe039..c90f4ae0c50b6 100644 --- a/apps/site/app/global-error.tsx +++ b/apps/site/app/global-error.tsx @@ -6,7 +6,7 @@ import type { FC } from 'react'; import Button from '@/components/Common/Button'; import BaseLayout from '@/layouts/Base'; -import HomeLayout from '@/layouts/Home'; +import GlowingBackdropLayout from '@/layouts/GlowingBackdrop'; const GlobalErrorPage: FC<{ error: Error }> = ({ error }) => { captureException(error); @@ -15,7 +15,7 @@ const GlobalErrorPage: FC<{ error: Error }> = ({ error }) => { - + 500

Internal Server Error

@@ -25,7 +25,7 @@ const GlobalErrorPage: FC<{ error: Error }> = ({ error }) => { Back to Home - + diff --git a/apps/site/components/withLayout.tsx b/apps/site/components/withLayout.tsx index 29e53ef1a56cd..8d5a7d4745e9a 100644 --- a/apps/site/components/withLayout.tsx +++ b/apps/site/components/withLayout.tsx @@ -5,7 +5,7 @@ import ArticlePageLayout from '@/layouts/ArticlePage'; import BlogLayout from '@/layouts/Blog'; import DefaultLayout from '@/layouts/Default'; import DownloadLayout from '@/layouts/Download'; -import HomeLayout from '@/layouts/Home'; +import GlowingBackdropLayout from '@/layouts/GlowingBackdrop'; import LearnLayout from '@/layouts/Learn'; import PostLayout from '@/layouts/Post'; import SearchLayout from '@/layouts/Search'; @@ -13,7 +13,7 @@ import type { Layouts } from '@/types'; const layouts = { about: AboutLayout, - home: HomeLayout, + home: props => , learn: LearnLayout, page: DefaultLayout, 'blog-post': PostLayout, diff --git a/apps/site/layouts/Home.tsx b/apps/site/layouts/GlowingBackdrop.tsx similarity index 50% rename from apps/site/layouts/Home.tsx rename to apps/site/layouts/GlowingBackdrop.tsx index d4ff2f2dafd66..2457baf8e0877 100644 --- a/apps/site/layouts/Home.tsx +++ b/apps/site/layouts/GlowingBackdrop.tsx @@ -1,3 +1,4 @@ +import classNames from 'classnames'; import type { FC, PropsWithChildren } from 'react'; import GlowingBackdrop from '@/components/Common/GlowingBackdrop'; @@ -6,16 +7,29 @@ import WithNavBar from '@/components/withNavBar'; import styles from './layouts.module.css'; -const HomeLayout: FC = ({ children }) => ( +type GlowingBackdropLayoutProps = PropsWithChildren<{ + kind?: 'home'; +}>; + +const GlowingBackdropLayout: FC = ({ + kind, + children, +}) => ( <>

-
{children}
+
+ {children} +
); -export default HomeLayout; +export default GlowingBackdropLayout;