File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import React from "react";
77import { getLocale } from "@calcom/features/auth/lib/getLocale" ;
88import { loadTranslations } from "@calcom/lib/server/i18n" ;
99import { IconSprites } from "@calcom/ui/components/icon" ;
10- import { NotificationSoundHandler } from "@calcom/web/components/notification-sound-handler" ;
1110
1211import { buildLegacyRequest } from "@lib/buildLegacyCtx" ;
1312
@@ -152,13 +151,11 @@ export default async function RootLayout({ children }: { children: React.ReactNo
152151 ] }
153152 />
154153
155- < Providers >
154+ < Providers isEmbed = { isEmbed } >
156155 < AppRouterI18nProvider translations = { translations } locale = { locale } ns = { ns } >
157156 { children }
158157 </ AppRouterI18nProvider >
159158 </ Providers >
160- { ! isEmbed && < NotificationSoundHandler /> }
161- < NotificationSoundHandler />
162159 </ body >
163160 </ html >
164161 ) ;
Original file line number Diff line number Diff line change @@ -5,20 +5,23 @@ import { SessionProvider } from "next-auth/react";
55import CacheProvider from "react-inlinesvg/provider" ;
66
77import { WebPushProvider } from "@calcom/features/notifications/WebPushContext" ;
8+ import { NotificationSoundHandler } from "@calcom/web/components/notification-sound-handler" ;
89
910import useIsBookingPage from "@lib/hooks/useIsBookingPage" ;
1011import PlainChat from "@lib/plain/dynamicProvider" ;
1112
1213type ProvidersProps = {
14+ isEmbed : boolean ;
1315 children : React . ReactNode ;
1416} ;
15- export function Providers ( { children } : ProvidersProps ) {
17+ export function Providers ( { isEmbed , children } : ProvidersProps ) {
1618 const isBookingPage = useIsBookingPage ( ) ;
1719
1820 return (
1921 < SessionProvider >
2022 < TrpcProvider >
2123 { ! isBookingPage ? < PlainChat /> : null }
24+ { ! isEmbed && ! isBookingPage && < NotificationSoundHandler /> }
2225 { /* @ts -expect-error FIXME remove this comment when upgrading typescript to v5 */ }
2326 < CacheProvider >
2427 < WebPushProvider > { children } </ WebPushProvider >
You can’t perform that action at this time.
0 commit comments