From 11a41e0e39a8df292ffd6a37a5788c392db80b7f Mon Sep 17 00:00:00 2001 From: Benny Joo Date: Thu, 17 Apr 2025 12:26:15 -0400 Subject: [PATCH] fix: return react fragment from all layout.tsx --- .../(use-page-wrapper)/(main-nav)/layout.tsx | 6 +++++- .../apps/categories/layout.tsx | 2 +- .../availability/troubleshoot/layout.tsx | 12 ++++++----- .../(use-page-wrapper)/insights/layout.tsx | 20 ++++++++++--------- .../settings/(settings-layout)/layout.tsx | 6 +++++- 5 files changed, 29 insertions(+), 17 deletions(-) diff --git a/apps/web/app/(use-page-wrapper)/(main-nav)/layout.tsx b/apps/web/app/(use-page-wrapper)/(main-nav)/layout.tsx index e33202da76..b32accc62a 100644 --- a/apps/web/app/(use-page-wrapper)/(main-nav)/layout.tsx +++ b/apps/web/app/(use-page-wrapper)/(main-nav)/layout.tsx @@ -11,7 +11,11 @@ const Layout = async ({ children }: { children: React.ReactNode }) => { const session = await getServerSession({ req: buildLegacyRequest(await headers(), await cookies()) }); if (session?.user?.id) SentrySetUser({ id: session.user.id }); - return {children}; + return ( + <> + {children} + + ); }; export default Layout; diff --git a/apps/web/app/(use-page-wrapper)/apps/categories/layout.tsx b/apps/web/app/(use-page-wrapper)/apps/categories/layout.tsx index 46785b22c5..c93e7cd7f8 100644 --- a/apps/web/app/(use-page-wrapper)/apps/categories/layout.tsx +++ b/apps/web/app/(use-page-wrapper)/apps/categories/layout.tsx @@ -8,5 +8,5 @@ export const generateMetadata = async () => { }; export default function Layout({ children }: { children: React.ReactNode }) { - return children; + return <>{children}; } diff --git a/apps/web/app/(use-page-wrapper)/availability/troubleshoot/layout.tsx b/apps/web/app/(use-page-wrapper)/availability/troubleshoot/layout.tsx index fd658aa504..84d2e2c794 100644 --- a/apps/web/app/(use-page-wrapper)/availability/troubleshoot/layout.tsx +++ b/apps/web/app/(use-page-wrapper)/availability/troubleshoot/layout.tsx @@ -7,10 +7,12 @@ import { Icon } from "@calcom/ui/components/icon"; export default function TroubleshooterLayout({ children }: { children: React.ReactNode }) { return ( -
- - }>{children} - -
+ <> +
+ + }>{children} + +
+ ); } diff --git a/apps/web/app/(use-page-wrapper)/insights/layout.tsx b/apps/web/app/(use-page-wrapper)/insights/layout.tsx index ccf32c60fe..6af02c3dcf 100644 --- a/apps/web/app/(use-page-wrapper)/insights/layout.tsx +++ b/apps/web/app/(use-page-wrapper)/insights/layout.tsx @@ -8,14 +8,16 @@ import UpgradeTipWrapper from "./UpgradeTipWrapper"; export default async function InsightsLayout({ children }: { children: React.ReactNode }) { const t = await getTranslate(); return ( -
- }> - {children} - -
+ <> +
+ }> + {children} + +
+ ); } diff --git a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/layout.tsx b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/layout.tsx index b19a991418..fcf2b98481 100644 --- a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/layout.tsx +++ b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/layout.tsx @@ -30,5 +30,9 @@ export default async function SettingsLayoutAppDir(props: SettingsLayoutAppDirPr }); } catch (err) {} - return ; + return ( + <> + ; + + ); }