fix: type + build errors (#18502)

This commit is contained in:
Alex van Andel
2025-01-07 18:35:06 +01:00
committed by GitHub
parent e359d13d9a
commit 57bd0b3df3
5 changed files with 28 additions and 5 deletions
@@ -1,9 +1,21 @@
import withEmbedSsrAppDir from "app/WithEmbedSSR";
import { WithLayout } from "app/layoutHOC";
import { Page, type OrgTypePageProps } from "app/org/[orgSlug]/[user]/[type]/page";
import { type OrgTypePageProps } from "app/org/[orgSlug]/[user]/[type]/page";
import { getServerSideProps } from "@lib/org/[orgSlug]/[user]/[type]/getServerSideProps";
import type { PageProps as TeamTypePageProps } from "~/team/type-view";
import TeamTypePage from "~/team/type-view";
import UserTypePage from "~/users/views/users-type-public-view";
import type { PageProps as UserTypePageProps } from "~/users/views/users-type-public-view";
const getEmbedData = withEmbedSsrAppDir<OrgTypePageProps>(getServerSideProps);
const Page = async (props: OrgTypePageProps) => {
if ((props as TeamTypePageProps)?.teamId) {
return <TeamTypePage {...(props as TeamTypePageProps)} />;
}
return <UserTypePage {...(props as UserTypePageProps)} />;
};
export default WithLayout({ getLayout: null, getData: getEmbedData, isBookingPage: true, ServerPage: Page });
@@ -1,9 +1,21 @@
import withEmbedSsrAppDir from "app/WithEmbedSSR";
import { WithLayout } from "app/layoutHOC";
import { Page, type OrgPageProps } from "app/org/[orgSlug]/[user]/page";
import { type OrgPageProps } from "app/org/[orgSlug]/[user]/page";
import { getServerSideProps } from "@lib/org/[orgSlug]/[user]/getServerSideProps";
import type { PageProps as TeamPageProps } from "~/team/team-view";
import TeamPage from "~/team/team-view";
import UserPage from "~/users/views/users-public-view";
import type { PageProps as UserPageProps } from "~/users/views/users-public-view";
const getEmbedData = withEmbedSsrAppDir<OrgPageProps>(getServerSideProps);
const Page = async (props: OrgPageProps) => {
if ((props as TeamPageProps)?.team) {
return <TeamPage {...(props as TeamPageProps)} />;
}
return <UserPage {...(props as UserPageProps)} />;
};
export default WithLayout({ getLayout: null, getData: getEmbedData, isBookingPage: true, ServerPage: Page });
@@ -44,7 +44,7 @@ export const generateMetadata = async ({ params, searchParams }: PageProps) => {
});
};
export const Page = async (props: OrgTypePageProps) => {
const Page = async (props: OrgTypePageProps) => {
if ((props as TeamTypePageProps)?.teamId) {
return <TeamTypePage {...(props as TeamTypePageProps)} />;
}
+1 -1
View File
@@ -54,7 +54,7 @@ export const generateMetadata = async ({ params, searchParams }: PageProps) => {
}
};
export const Page = async (props: OrgPageProps) => {
const Page = async (props: OrgPageProps) => {
if ((props as TeamPageProps)?.team) {
return <TeamPage {...(props as TeamPageProps)} />;
}
-1
View File
@@ -19,7 +19,6 @@ import { OrgBrandingProvider } from "@calcom/features/ee/organizations/context/p
import DynamicHelpscoutProvider from "@calcom/features/ee/support/lib/helpscout/providerDynamic";
import { FeatureProvider } from "@calcom/features/flags/context/provider";
import { useFlags } from "@calcom/features/flags/hooks";
import { MetaProvider } from "@calcom/ui";
import useIsBookingPage from "@lib/hooks/useIsBookingPage";
import PlainChat from "@lib/plain/plainChat";