"use client"; import { FC, PropsWithChildren, useState } from "react"; import { CssBaseline } from "@mui/material"; import { CookiesProvider } from "react-cookie"; import { SessionProvider } from "next-auth/react"; import { NextAppDirEmotionCacheProvider } from "tss-react/next/appDir"; import { I18n } from "react-polyglot"; import { AdapterDateFns } from "@mui/x-date-pickers-pro/AdapterDateFnsV3"; import { LocalizationProvider } from "@mui/x-date-pickers-pro"; import { LicenseInfo } from "@mui/x-license"; import { locales, LeafcutterProvider } from "@link-stack/leafcutter-ui"; import { CSRFProvider } from "./CSRFProvider"; LicenseInfo.setLicenseKey( "c787ac6613c5f2aa0494c4285fe3e9f2Tz04OTY1NyxFPTE3NDYzNDE0ODkwMDAsUz1wcm8sTE09c3Vic2NyaXB0aW9uLEtWPTI=", ); export const MultiProvider: FC = ({ children }) => { const origin = typeof window !== "undefined" && window.location.origin ? window.location.origin : null; const messages: any = { en: locales.en, fr: locales.fr }; const locale = "en"; return ( {children} ); };