fix: return react fragment from all layout.tsx
This commit is contained in:
1 parent
880fe151c0
commit
11a41e0e39
5 files changed
+29
-17
No files matched your search
@@ -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;
|
||||
@@ -8,5 +8,5 @@ export const generateMetadata = async () => {
|
||||
};
|
||||
|
||||
export default function Layout({ children }: { children: React.ReactNode }) {
|
||||
return children;
|
||||
return <>{children}</>;
|
||||
}
|
||||
@@ -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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -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} />;
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user