|
|
@ -32,6 +32,8 @@ import Info from '../res/icon/infoGreen.png';
|
|
|
|
|
|
|
|
|
|
|
|
let cptNavigation = 0
|
|
|
|
let cptNavigation = 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const basePath = process.env.REACT_APP_BASE_PATH || '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Play() {
|
|
|
|
function Play() {
|
|
|
|
let first = true
|
|
|
|
let first = true
|
|
|
@ -98,7 +100,7 @@ function Play() {
|
|
|
|
setPersonNetworkData(networkPerson)
|
|
|
|
setPersonNetworkData(networkPerson)
|
|
|
|
setIndicesData(choosenIndices)
|
|
|
|
setIndicesData(choosenIndices)
|
|
|
|
setIndicesData(choosenIndices)
|
|
|
|
setIndicesData(choosenIndices)
|
|
|
|
navigate('/game?solo=true&daily=false');
|
|
|
|
navigate(`${basePath}/game?solo=true&daily=false`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -129,12 +131,12 @@ function Play() {
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
if (room !== null) {
|
|
|
|
if (room !== null) {
|
|
|
|
const nouvelleURL = `/lobby?room=${room}`;
|
|
|
|
const nouvelleURL = `/lobby?room=${room}`;
|
|
|
|
navigate(nouvelleURL);
|
|
|
|
navigate(`${basePath}${nouvelleURL}`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, [room, navigate]);
|
|
|
|
}, [room, navigate]);
|
|
|
|
|
|
|
|
|
|
|
|
const goBack = () => {
|
|
|
|
const goBack = () => {
|
|
|
|
navigate("/lobby?room=" + goBackRoom)
|
|
|
|
navigate(`${basePath}/lobby?room=${goBackRoom}`)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -157,7 +159,7 @@ function Play() {
|
|
|
|
setIndicesData(choosenIndices)
|
|
|
|
setIndicesData(choosenIndices)
|
|
|
|
setIndicesData(choosenIndices)
|
|
|
|
setIndicesData(choosenIndices)
|
|
|
|
|
|
|
|
|
|
|
|
navigate('/game?solo=true&daily=true&easy=true');
|
|
|
|
navigate(`${basePath}/game?solo=true&daily=true&easy=true`);
|
|
|
|
setShowOverlay(false);
|
|
|
|
setShowOverlay(false);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -175,7 +177,7 @@ function Play() {
|
|
|
|
const map = EnigmeDuJourCreator.createEnigme(networkPerson, choosenIndices, choosenPerson, Stub.GenerateIndice())
|
|
|
|
const map = EnigmeDuJourCreator.createEnigme(networkPerson, choosenIndices, choosenPerson, Stub.GenerateIndice())
|
|
|
|
setDailyEnigmeData(map)
|
|
|
|
setDailyEnigmeData(map)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
navigate('/game?solo=true&daily=true&easy=false');
|
|
|
|
navigate(`${basePath}/game?solo=true&daily=true&easy=false`);
|
|
|
|
setShowOverlay(false);
|
|
|
|
setShowOverlay(false);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -238,7 +240,7 @@ function Play() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<button onClick={createLobby} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Créer une partie </button>
|
|
|
|
<button onClick={createLobby} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Créer une partie </button>
|
|
|
|
<button onClick= {() => navigate("/join")} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Rejoindre </button>
|
|
|
|
<button onClick= {() => navigate(`${basePath}/join`)} className="ButtonNav" style={{backgroundColor: theme.colors.primary, borderColor: theme.colors.secondary}}> Rejoindre </button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className='rightContainer'>
|
|
|
|
<div className='rightContainer'>
|
|
|
|