Here I am getting error like
import error: 'LanguageProvider' is not exported from 'contexts/language/language.provider'.
language.provider.tsx
import React from 'react';const LanguageContext = React.createContext({} as any);export const LanguageProvider = ({ children, messages, initLocale }) => { const [locale, setLocale] = React.useState(initLocale ?? 'en'); const changeLanguage = (newLocale): void => { ... }; let isRtl = isRTL(locale); return (<LanguageContext.Provider value={{ locale, changeLanguage, isRtl }}> ...</LanguageContext.Provider> );};export const useLocale = () => React.useContext(LanguageContext);
_app.tsx
import React from "react";import App from "next/app";import { LanguageProvider } from "contexts/language/language.provider";// need to provide typesexport default function ExtendedApp({ Component, pageProps, userAgent, locale, query,}) { const deviceType = useDeviceType(userAgent); return (<ThemeProvider theme={theme}><LanguageProvider messages={messages} initLocale={locale}> ...</LanguageProvider></ThemeProvider> );}
Can anyone please help me with this?