Skip to content

Commit

Permalink
Issue #language const not working - resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
suvarnakale committed May 9, 2024
1 parent 475870f commit 185334f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
6 changes: 5 additions & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import Brightness7Icon from '@mui/icons-material/Brightness7';
import IconButton from '@mui/material/IconButton';
import customTheme from '../styles/customStyles';
import darkTheme from '@/styles/darkStyle';
import { I18nextProvider } from 'react-i18next';
import i18n from '../i18n';

const ColorModeContext = React.createContext({ toggleColorMode: () => {} });

Expand Down Expand Up @@ -55,7 +57,9 @@ export default function App({ Component, pageProps }: AppProps) {
<ColorModeContext.Provider value={colorMode}>
<ThemeProvider theme={mode === 'light' ? customTheme : darkTheme}>
{/* <DarkTheme /> */}
<Component {...pageProps} />
<I18nextProvider i18n={i18n}>
<Component {...pageProps} />
</I18nextProvider>
</ThemeProvider>
</ColorModeContext.Provider>
);
Expand Down
10 changes: 1 addition & 9 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { I18nextProvider } from 'react-i18next';
import React from 'react';
// Import necessary modules
import dynamic from 'next/dynamic';
import i18n from '../i18n';

// Define the type for props

Expand All @@ -21,13 +19,7 @@ const Home: React.FC = () => {

return (
<>
{/* I18nextProvider for internationalization */}
<I18nextProvider i18n={i18n}>
{/* Render the TemporaryDrawer and Login components */}

{/* <Login /> */}
<Dashboard />
</I18nextProvider>
<Login />
</>
);
};
Expand Down

0 comments on commit 185334f

Please sign in to comment.