diff --git a/apps/web/app/providers.tsx b/apps/web/app/providers.tsx index f8bb316c03..15e462e6a4 100644 --- a/apps/web/app/providers.tsx +++ b/apps/web/app/providers.tsx @@ -4,13 +4,16 @@ import { TrpcProvider } from "app/_trpc/trpc-provider"; import { SessionProvider } from "next-auth/react"; import CacheProvider from "react-inlinesvg/provider"; +import useIsBookingPage from "@lib/hooks/useIsBookingPage"; import PlainChat from "@lib/plain/dynamicProvider"; export function Providers({ children }: { children: React.ReactNode }) { + const isBookingPage = useIsBookingPage(); + return ( - + {!isBookingPage ? : null} {/* @ts-expect-error FIXME remove this comment when upgrading typescript to v5 */} {children} diff --git a/apps/web/lib/hooks/useIsBookingPage.ts b/apps/web/lib/hooks/useIsBookingPage.ts index 7b1f10c574..2ecec817f8 100644 --- a/apps/web/lib/hooks/useIsBookingPage.ts +++ b/apps/web/lib/hooks/useIsBookingPage.ts @@ -8,14 +8,16 @@ export default function useIsBookingPage(): boolean { "/booking", "/cancel", "/reschedule", + "/instant-meeting", // Instant booking page + "/team", // Team booking pages "/d", // Private Link of booking page "/apps/routing-forms/routing-link", // Routing Form page "/forms/", // Rewrites to /apps/routing-forms/routing-link ].some((route) => pathname?.startsWith(route)); const searchParams = useCompatSearchParams(); - const userParam = Boolean(searchParams?.get("user")); - const teamParam = Boolean(searchParams?.get("team")); + const isUserBookingPage = Boolean(searchParams?.get("user")); + const isUserBookingTypePage = Boolean(searchParams?.get("user") && searchParams?.get("type")); - return isBookingPage || userParam || teamParam; + return isBookingPage || isUserBookingPage || isUserBookingTypePage; }