diff --git a/apps/web/lib/app-providers.tsx b/apps/web/lib/app-providers.tsx index 51d3bfd0ea..973f9f55c1 100644 --- a/apps/web/lib/app-providers.tsx +++ b/apps/web/lib/app-providers.tsx @@ -8,7 +8,6 @@ import { ThemeProvider } from "next-themes"; import type { AppProps as NextAppProps, AppProps as NextJsAppProps } from "next/app"; import type { ParsedUrlQuery } from "querystring"; import type { PropsWithChildren, ReactNode } from "react"; -import { useEffect } from "react"; import { OrgBrandingProvider } from "@calcom/features/ee/organizations/context/provider"; import DynamicHelpscoutProvider from "@calcom/features/ee/support/lib/helpscout/providerDynamic"; @@ -75,23 +74,6 @@ const CustomI18nextProvider = (props: AppPropsWithoutNonce) => { const session = useSession(); const locale = session?.data?.user.locale ?? props.pageProps.newLocale; - - useEffect(() => { - window.document.documentElement.lang = locale; - - let direction = window.document.dir || "ltr"; - - try { - const intlLocale = new Intl.Locale(locale); - // @ts-expect-error INFO: Typescript does not know about the Intl.Locale textInfo attribute - direction = intlLocale.textInfo?.direction; - } catch (error) { - console.error(error); - } - - window.document.dir = direction; - }, [locale]); - const clientViewerI18n = useViewerI18n(locale); const i18n = clientViewerI18n.data?.i18n; @@ -99,7 +81,6 @@ const CustomI18nextProvider = (props: AppPropsWithoutNonce) => { ...props, pageProps: { ...props.pageProps, - ...i18n, }, };