Scheduling infrastructure for absolutely everyone.
fix: type + build errors (#18502)
Alex van Andel57bd0b3df313
diff --git a/apps/web/app/future/org/[orgSlug]/[user]/[type]/embed/page.tsx b/apps/web/app/future/org/[orgSlug]/[user]/[type]/embed/page.tsxindex b008b6c5a60..98819cebc67 100644--- a/apps/web/app/future/org/[orgSlug]/[user]/[type]/embed/page.tsx+++ b/apps/web/app/future/org/[orgSlug]/[user]/[type]/embed/page.tsx@@ -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 });diff --git a/apps/web/app/future/org/[orgSlug]/[user]/embed/page.tsx b/apps/web/app/future/org/[orgSlug]/[user]/embed/page.tsxindex 0ee2487d1e2..d90e61ee3d9 100644--- a/apps/web/app/future/org/[orgSlug]/[user]/embed/page.tsx+++ b/apps/web/app/future/org/[orgSlug]/[user]/embed/page.tsx@@ -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 });diff --git a/apps/web/app/org/[orgSlug]/[user]/[type]/page.tsx b/apps/web/app/org/[orgSlug]/[user]/[type]/page.tsxindex 8bb4a1fe208..44fe4a385bf 100644--- a/apps/web/app/org/[orgSlug]/[user]/[type]/page.tsx+++ b/apps/web/app/org/[orgSlug]/[user]/[type]/page.tsx@@ -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)} />;}diff --git a/apps/web/app/org/[orgSlug]/[user]/page.tsx b/apps/web/app/org/[orgSlug]/[user]/page.tsxindex a72bc7134f9..d9e11f8395c 100644--- a/apps/web/app/org/[orgSlug]/[user]/page.tsx+++ b/apps/web/app/org/[orgSlug]/[user]/page.tsx@@ -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)} />;}diff --git a/apps/web/lib/app-providers-app-dir.tsx b/apps/web/lib/app-providers-app-dir.tsxindex c816976f1a9..419bb5cb27a 100644--- a/apps/web/lib/app-providers-app-dir.tsx+++ b/apps/web/lib/app-providers-app-dir.tsx@@ -19,7 +19,6 @@ import { OrgBrandingProvider } from "@calcom/features/ee/organizations/context/pimport 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";