remove MainLayout / MainLayoutAppDir (#18498)

This commit is contained in:
Benny Joo
2025-01-07 12:13:00 +00:00
committed by GitHub
parent 00f7d8be0d
commit 0c69c5dfea
4 changed files with 4 additions and 40 deletions
+1 -3
View File
@@ -1,8 +1,6 @@
import { _generateMetadata } from "app/_utils";
import { WithLayout } from "app/layoutHOC";
import { getLayout } from "@calcom/features/MainLayoutAppDir";
import EnterprisePage from "@components/EnterprisePage";
export const generateMetadata = async () =>
@@ -11,4 +9,4 @@ export const generateMetadata = async () =>
(t) => t("create_your_org_description")
);
export default WithLayout({ getLayout, Page: EnterprisePage })<"P">;
export default WithLayout({ Page: EnterprisePage })<"P">;
+3 -3
View File
@@ -1,6 +1,6 @@
"use client";
import { ShellMain } from "@calcom/features/shell/Shell";
import Shell from "@calcom/features/shell/Shell";
import { UpgradeTip } from "@calcom/features/tips";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Button, ButtonGroup, Icon } from "@calcom/ui";
@@ -42,7 +42,7 @@ export default function EnterprisePage() {
];
return (
<div>
<ShellMain heading={t("enterprise")} subtitle={t("enterprise_description")}>
<Shell heading={t("enterprise")} subtitle={t("enterprise_description")}>
<UpgradeTip
plan="enterprise"
title={t("create_your_org")}
@@ -63,7 +63,7 @@ export default function EnterprisePage() {
}>
<>Create Org</>
</UpgradeTip>
</ShellMain>
</Shell>
</div>
);
}
-17
View File
@@ -1,17 +0,0 @@
import type { ComponentProps } from "react";
import React from "react";
import Shell from "@calcom/features/shell/Shell";
export default function MainLayout({
children,
...rest
}: { children: React.ReactNode } & ComponentProps<typeof Shell>) {
return (
<Shell withoutMain={true} {...rest}>
{children}
</Shell>
);
}
export const getLayout = (page: React.ReactElement) => <MainLayout>{page}</MainLayout>;
-17
View File
@@ -1,17 +0,0 @@
"use client";
import type { ComponentProps } from "react";
import React from "react";
import Shell from "@calcom/features/shell/Shell";
export type MainLayoutAppDirProps = { children: React.ReactNode } & ComponentProps<typeof Shell>;
export default function MainLayoutAppDir({ children, ...rest }: MainLayoutAppDirProps) {
return (
<Shell withoutMain={true} {...rest}>
{children}
</Shell>
);
}
export const getLayout = (page: React.ReactElement) => <MainLayoutAppDir>{page}</MainLayoutAppDir>;