Skip to content

Scheduling infrastructure for absolutely everyone.

fix: return react fragment from all layout.tsx

Benny Joo11a41e0e39a8
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 e33202da76c..b32accc62a8 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 <Shell withoutMain={true}>{children}</Shell>;
+ return (
+ <>
+ <Shell withoutMain={true}>{children}</Shell>
+ </>
+ );
};
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 46785b22c55..c93e7cd7f87 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 fd658aa5047..84d2e2c794a 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 (
- <div className="flex flex-1 [&>*]:flex-1">
- <ErrorBoundary>
- <Suspense fallback={<Icon name="loader" />}>{children}</Suspense>
- </ErrorBoundary>
- </div>
+ <>
+ <div className="flex flex-1 [&>*]:flex-1">
+ <ErrorBoundary>
+ <Suspense fallback={<Icon name="loader" />}>{children}</Suspense>
+ </ErrorBoundary>
+ </div>
+ </>
);
}
diff --git a/apps/web/app/(use-page-wrapper)/insights/layout.tsx b/apps/web/app/(use-page-wrapper)/insights/layout.tsx
index ccf32c60fee..6af02c3dcf5 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 (
- <div>
- <Shell
- withoutMain={false}
- heading={t("insights")}
- subtitle={t("insights_subtitle")}
- actions={<div className={`mb-2 flex items-center gap-2 ${CTA_CONTAINER_CLASS_NAME}`} />}>
- <UpgradeTipWrapper>{children}</UpgradeTipWrapper>
- </Shell>
- </div>
+ <>
+ <div>
+ <Shell
+ withoutMain={false}
+ heading={t("insights")}
+ subtitle={t("insights_subtitle")}
+ actions={<div className={`mb-2 flex items-center gap-2 ${CTA_CONTAINER_CLASS_NAME}`} />}>
+ <UpgradeTipWrapper>{children}</UpgradeTipWrapper>
+ </Shell>
+ </div>
+ </>
);
}
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 b19a991418e..fcf2b984816 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 <SettingsLayoutAppDirClient {...props} currentOrg={currentOrg} otherTeams={otherTeams} />;
+ return (
+ <>
+ <SettingsLayoutAppDirClient {...props} currentOrg={currentOrg} otherTeams={otherTeams} />;
+ </>
+ );
}