More app directory refactoring
This commit is contained in:
parent
b312a8c862
commit
8bbeaa25cf
55 changed files with 903 additions and 899 deletions
|
|
@ -1,6 +1,6 @@
|
|||
"use client";
|
||||
|
||||
import { useRouter } from "next/router";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { IconButton, Menu, MenuItem, Box } from "@mui/material";
|
||||
import { KeyboardArrowDown as KeyboardArrowDownIcon } from "@mui/icons-material";
|
||||
import {
|
||||
|
|
@ -17,6 +17,7 @@ export const LanguageSelect = () => {
|
|||
} = useAppContext();
|
||||
const router = useRouter();
|
||||
const locales: any = { en: "English", fr: "Français" };
|
||||
const locale = "en";
|
||||
const popupState = usePopupState({ variant: "popover", popupId: "language" });
|
||||
|
||||
return (
|
||||
|
|
@ -38,7 +39,7 @@ export const LanguageSelect = () => {
|
|||
},
|
||||
}}
|
||||
>
|
||||
{locales[router.locale as any] ?? locales.en}
|
||||
{locales[locale as any] ?? locales.en}
|
||||
<KeyboardArrowDownIcon />
|
||||
</IconButton>
|
||||
<Menu {...bindMenu(popupState)}>
|
||||
|
|
@ -46,7 +47,7 @@ export const LanguageSelect = () => {
|
|||
<MenuItem
|
||||
key={locale}
|
||||
onClick={() => {
|
||||
router.push(router.route, router.route, { locale });
|
||||
// router.push(router.route, router.route, { locale });
|
||||
popupState.close();
|
||||
}}
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue