diff --git a/src/components/Navbar/index.tsx b/src/components/Navbar/index.tsx index 39fa477..44389a9 100644 --- a/src/components/Navbar/index.tsx +++ b/src/components/Navbar/index.tsx @@ -13,7 +13,10 @@ import { ListItem, ListItemButton, ListItemText, - Stack + Stack, + Select, + MenuItem, + FormControl } from '@mui/material'; import useMediaQuery from '@mui/material/useMediaQuery'; import { useTheme } from '@mui/material/styles'; @@ -30,7 +33,7 @@ const Navbar: React.FC = ({ mode, onChangeMode: onChangeMode }) => { - const { t } = useTranslation(); + const { t, i18n } = useTranslation(); const navigate = useNavigate(); const theme = useTheme(); const isMobile = useMediaQuery(theme.breakpoints.down('md')); @@ -38,12 +41,46 @@ const Navbar: React.FC = ({ const toggleDrawer = (open: boolean) => () => { setDrawerOpen(open); }; + + const handleLanguageChange = (event: any) => { + i18n.changeLanguage(event.target.value); + }; + const navItems: { label: string; path: string }[] = [ // { label: 'Features', path: '/features' } // { label: 'About Us', path: '/about-us' } ]; + const languageSelector = ( + + + + ); + const buttons: ReactNode[] = [ + languageSelector,