variable d'environnement pour le path avec le /
continuous-integration/drone/push Build is passing Details

pull/98/head^2
Thomas Chazot 1 year ago
parent 6d390d0341
commit bc24e060e5

@ -811,7 +811,7 @@ const MyGraphComponent: React.FC<MyGraphComponentProps> = ({onNodeClick, handleS
socket.off("put imossible grey")
socket.off("who plays")
navigate(`/${basePath}/endgame`)
navigate(`${basePath}/endgame`)
}
}
})
@ -1020,7 +1020,7 @@ const MyGraphComponent: React.FC<MyGraphComponentProps> = ({onNodeClick, handleS
catch(error){
console.log(error);
}
navigate(`/${basePath}/endgame?solo=true+${isDaily}`)
navigate(`${basePath}/endgame?solo=true+${isDaily}`)
}
}

@ -49,7 +49,7 @@ const LobbyContainer: React.FC<LobbyContainerProps> = ({roomNum, HeadPlayer, nbP
if (nbPlayer < 6 && !started) {
socket.off("request lobbies")
setFirst(true)
navigate(`/${basePath}/${dest}`);
navigate(`${basePath}/${dest}`);
}
else if(started){
handleShowStart()

@ -37,11 +37,11 @@ function AppNavbar({changeLocale}) {
function navigateToProfile(){
navigate(`/${basePath}/profile`)
navigate(`${basePath}/profile`)
}
function navigateToHome(){
navigate(`/${basePath}/`)
navigate(`${basePath}/`)
}
return (

@ -136,7 +136,7 @@ function Lobby() {
gameStarted = true
//socket.off("player left")
//socket.off("new player")
navigate(`/${basePath}/game?solo=false&daily=false`);
navigate(`${basePath}/game?solo=false&daily=false`);
});
@ -172,7 +172,7 @@ function Lobby() {
setIndicesData(choosenIndices)
first = true
gameStarted = true
navigate(`/${basePath}/game?solo=false&daily=false`)
navigate(`${basePath}/game?solo=false&daily=false`)
});
socket.on("new player", (tab) =>{
@ -187,17 +187,17 @@ function Lobby() {
socket.on("room full", () => {
//TODO POP UP pour quand la room est pleine
navigate(`/${basePath}/play`)
navigate(`${basePath}/play`)
})
socket.on("game started", () => {
//TODO POP UP pour quand la room est pleine
navigate(`/${basePath}/play`)
navigate(`${basePath}/play`)
})
socket.on("game already started", () => {
//TODO POP UP pour quand la room est pleine
navigate(`/${basePath}/play`)
navigate(`${basePath}/play`)
})
socket.on("player left", (tab, i) => {

@ -37,7 +37,7 @@ const SignIn = () => {
setShowConfirmation(true);
setTimeout(async () => {
await login();
navigate(`/${basePath}/`);
navigate(`${basePath}/`);
}, 1250);
}
} catch (error: any) {

@ -100,7 +100,7 @@ function NewPlay() {
setPersonNetworkData(networkPerson)
setIndicesData(choosenIndices)
setIndicesData(choosenIndices)
navigate(`/${basePath}/game?solo=true&daily=false`);
navigate(`${basePath}/game?solo=true&daily=false`);
}
@ -131,12 +131,12 @@ function NewPlay() {
useEffect(() => {
if (room !== null) {
const nouvelleURL = `/lobby?room=${room}`;
navigate(`/${basePath}${nouvelleURL}`)
navigate(`${basePath}${nouvelleURL}`)
}
}, [room, navigate]);
const goBack = () => {
navigate(`/${basePath}/lobby?room=${goBackRoom}`)
navigate(`${basePath}/lobby?room=${goBackRoom}`)
}
@ -159,7 +159,7 @@ function NewPlay() {
setIndicesData(choosenIndices)
setIndicesData(choosenIndices)
navigate(`/${basePath}/game?solo=true&daily=true&easy=true`);
navigate(`${basePath}/game?solo=true&daily=true&easy=true`);
setShowOverlay(false);
};
@ -177,7 +177,7 @@ function NewPlay() {
const map = EnigmeDuJourCreator.createEnigme(networkPerson, choosenIndices, choosenPerson, Stub.GenerateIndice())
setDailyEnigmeData(map)
}
navigate(`/${basePath}/game?solo=true&daily=true&easy=false`);
navigate(`${basePath}/game?solo=true&daily=true&easy=false`);
setShowOverlay(false);
};

@ -100,7 +100,7 @@ function Play() {
setPersonNetworkData(networkPerson)
setIndicesData(choosenIndices)
setIndicesData(choosenIndices)
navigate(`/${basePath}/game?solo=true&daily=false`);
navigate(`${basePath}/game?solo=true&daily=false`);
}
@ -131,12 +131,12 @@ function Play() {
useEffect(() => {
if (room !== null) {
const nouvelleURL = `/lobby?room=${room}`;
navigate(`/${basePath}${nouvelleURL}`);
navigate(`${basePath}${nouvelleURL}`);
}
}, [room, navigate]);
const goBack = () => {
navigate(`/${basePath}/lobby?room=${goBackRoom}`)
navigate(`${basePath}/lobby?room=${goBackRoom}`)
}
@ -159,7 +159,7 @@ function Play() {
setIndicesData(choosenIndices)
setIndicesData(choosenIndices)
navigate(`/${basePath}/game?solo=true&daily=true&easy=true`);
navigate(`${basePath}/game?solo=true&daily=true&easy=true`);
setShowOverlay(false);
};
@ -177,7 +177,7 @@ function Play() {
const map = EnigmeDuJourCreator.createEnigme(networkPerson, choosenIndices, choosenPerson, Stub.GenerateIndice())
setDailyEnigmeData(map)
}
navigate(`/${basePath}/game?solo=true&daily=true&easy=false`);
navigate(`${basePath}/game?solo=true&daily=true&easy=false`);
setShowOverlay(false);
};
@ -240,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= {() => navigate(`/${basePath}/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 className='rightContainer'>

@ -186,7 +186,7 @@ const Profile = () => {
}
handleCloseDeleteModal();
navigate(`/${basePath}/`)
navigate(`${basePath}/`)
} else {
console.error('Phrase de confirmation incorrecte.');

@ -35,7 +35,7 @@ const SignUp = () => {
setShowConfirmation(true);
setTimeout(() => {
navigate(`/${basePath}/login`); // 3 secondes avant de rediriger vers la page de connexion
navigate(`${basePath}/login`); // 3 secondes avant de rediriger vers la page de connexion
}, 1250);
}
} catch (error: any) {

Loading…
Cancel
Save