ajout des paramètres dans la page de jeu, pour changer la langue par exemple. bug au niveau des traductions et des navigations : la langue semble être reset 🐛

pull/56/head
Pierre Ferreira 1 year ago committed by Thomas Chazot
parent 915ed1e8f7
commit 7e9377c2e5

@ -28,9 +28,12 @@ import Offcanvas from 'react-bootstrap/Offcanvas';
/* Model */ /* Model */
import Stub from '../source/Stub'; import Stub from '../source/Stub';
import { HiLanguage } from 'react-icons/hi2';
import { Nav, NavDropdown } from 'react-bootstrap';
import { FormattedMessage } from 'react-intl';
//@ts-ignore //@ts-ignore
const InGame = ({locale}) => { const InGame = ({locale, changeLocale}) => {
const [showChoiceBar, setShowChoiceBar] = useState(false); const [showChoiceBar, setShowChoiceBar] = useState(false);
const theme = useTheme(); const theme = useTheme();
@ -49,6 +52,10 @@ const InGame = ({locale}) => {
const handleCloseP = () => setShowP(false); const handleCloseP = () => setShowP(false);
const handleShowP = () => setShowP(true); const handleShowP = () => setShowP(true);
const [showS, setShowS] = useState(false);
const handleCloseS = () => setShowS(false);
const handleShowS = () => setShowS(true);
const handleChange = () => { const handleChange = () => {
if (show){ if (show){
handleClose() handleClose()
@ -67,6 +74,14 @@ const InGame = ({locale}) => {
} }
}; };
const handleChangeS = () => {
if (showS){
handleCloseS()
}
else {
handleShowS()
}
};
/* Windows open */ /* Windows open */
//@ts-ignore //@ts-ignore

Loading…
Cancel
Save