diff --git a/gui/rpk-gui/src/components/I18nTheme.tsx b/gui/rpk-gui/src/components/I18nTheme.tsx index c72a983..2929b7c 100644 --- a/gui/rpk-gui/src/components/I18nTheme.tsx +++ b/gui/rpk-gui/src/components/I18nTheme.tsx @@ -3,6 +3,8 @@ import { useTranslation } from "@refinedev/core"; import { useTheme } from "@mui/material"; import * as locales from '@mui/material/locale'; import { createTheme, ThemeProvider } from "@mui/material/styles"; +import { LocalizationProvider } from "@mui/x-date-pickers"; +import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs"; type SupportedLocales = keyof typeof locales; @@ -10,11 +12,13 @@ export const I18nTheme: React.FC = ({ children }: PropsWithCh const { getLocale } = useTranslation(); const theme = useTheme() - const themeWithLocale = createTheme(theme, locales[getLocale() as SupportedLocales]) - + const locale = getLocale() || "en" + const themeWithLocale = createTheme(theme, locales[locale as SupportedLocales]) return ( - { children } + + { children } + ); }