* posthog version upgrade and calai banner tracking * disable posthog for EU * bunch more posthog tracking * Revert yarn.lock changes * add posthog package yarn changes * fix: add missing posthog import and fix lint warning in MemberInvitationModal Co-Authored-By: amit@cal.com <samit91848@gmail.com> * fix: type check * cubic fixes * refactor * remove ui playground --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
"use client";
|
|
|
|
import { TrpcProvider } from "app/_trpc/trpc-provider";
|
|
import { SessionProvider } from "next-auth/react";
|
|
import CacheProvider from "react-inlinesvg/provider";
|
|
|
|
import { WebPushProvider } from "@calcom/features/notifications/WebPushContext";
|
|
import { NotificationSoundHandler } from "@calcom/web/components/notification-sound-handler";
|
|
|
|
import useIsBookingPage from "@lib/hooks/useIsBookingPage";
|
|
|
|
import { GeoProvider } from "./GeoContext";
|
|
|
|
type ProvidersProps = {
|
|
isEmbed: boolean;
|
|
children: React.ReactNode;
|
|
nonce: string | undefined;
|
|
country: string;
|
|
};
|
|
export function Providers({ isEmbed, children, country }: ProvidersProps) {
|
|
const isBookingPage = useIsBookingPage();
|
|
|
|
return (
|
|
<GeoProvider country={country}>
|
|
<SessionProvider>
|
|
<TrpcProvider>
|
|
{!isEmbed && !isBookingPage && <NotificationSoundHandler />}
|
|
{/* @ts-expect-error FIXME remove this comment when upgrading typescript to v5 */}
|
|
<CacheProvider>
|
|
<WebPushProvider>{children}</WebPushProvider>
|
|
</CacheProvider>
|
|
</TrpcProvider>
|
|
</SessionProvider>
|
|
</GeoProvider>
|
|
);
|
|
}
|