perf: Server-Side Data Fetching in App Router: SettingsLayout / AdminLayout (#16537)

Co-authored-by: Joe Au-Yeung <[email protected]>
This commit is contained in:
Benny JooandJoe Au-Yeung authored and GitHub committed 2024-09-09 14:38:51 -07:00
1 parent 71443ef23d
commit 706d7dff42
25 files changed
+929 -874

No files matched your search

+3 -5
View File
@@ -5,10 +5,8 @@ import React from "react";
import Shell from "@calcom/features/shell/Shell";
export default function MainLayout({
children,
...rest
}: { children: React.ReactNode } & ComponentProps<typeof Shell>) {
export type MainLayoutAppDirProps = { children: React.ReactNode } & ComponentProps<typeof Shell>;
export default function MainLayoutAppDir({ children, ...rest }: MainLayoutAppDirProps) {
return (
<Shell withoutMain={true} {...rest}>
{children}
@@ -16,4 +14,4 @@ export default function MainLayout({
);
}
export const getLayout = (page: React.ReactElement) => <MainLayout>{page}</MainLayout>;
export const getLayout = (page: React.ReactElement) => <MainLayoutAppDir>{page}</MainLayoutAppDir>;