From 53ac430987aa7aeae77a7bb30d3d8bca2722c58b Mon Sep 17 00:00:00 2001 From: Thomas Chazot Date: Wed, 20 Dec 2023 18:21:28 +0100 Subject: [PATCH] fix / --- cryptide_project/src/App.tsx | 26 +- .../src/Components/BigButtonNav.tsx | 2 +- .../src/Components/ButtonImgNav.tsx | 2 +- .../src/Components/GraphContainer.tsx | 8 +- .../src/Components/LobbyContainer.tsx | 2 +- cryptide_project/src/Components/NavBar.tsx | 12 +- .../src/Components/TutorialGraph.tsx | 2 +- cryptide_project/src/Error/ErrorPage.tsx | 2 +- cryptide_project/src/Pages/EndGame.tsx | 6 +- cryptide_project/src/Pages/Home.tsx | 4 +- cryptide_project/src/Pages/InGame.tsx | 8 +- cryptide_project/src/Pages/Lobby.tsx | 10 +- cryptide_project/src/Pages/LoginForm.tsx | 4 +- cryptide_project/src/Pages/NewPlay.tsx | 12 +- cryptide_project/src/Pages/Play.tsx | 10 +- cryptide_project/src/Pages/Profile.tsx | 4 +- cryptide_project/src/Pages/SignUpForm.tsx | 4 +- cryptide_project/src/Pages/Tutorial.tsx | 4 +- cryptide_project/yarn.lock | 18589 ++++++++-------- 19 files changed, 9358 insertions(+), 9353 deletions(-) diff --git a/cryptide_project/src/App.tsx b/cryptide_project/src/App.tsx index c8662af..7cd9729 100644 --- a/cryptide_project/src/App.tsx +++ b/cryptide_project/src/App.tsx @@ -89,19 +89,19 @@ function App() { {hasNavbarVisible && } - } /> - } /> - } /> - } /> - } /> - } /> - }/> - } /> - } /> - } /> - } /> - } /> - }/> + } /> + } /> + } /> + } /> + } /> + } /> + }/> + } /> + } /> + } /> + } /> + } /> + }/> {/* }/> */} } /> {/* page 404 */} diff --git a/cryptide_project/src/Components/BigButtonNav.tsx b/cryptide_project/src/Components/BigButtonNav.tsx index d953446..28fdfed 100644 --- a/cryptide_project/src/Components/BigButtonNav.tsx +++ b/cryptide_project/src/Components/BigButtonNav.tsx @@ -17,7 +17,7 @@ function BigButtonNav({ dest, img}) { // }; return ( - + diff --git a/cryptide_project/src/Components/ButtonImgNav.tsx b/cryptide_project/src/Components/ButtonImgNav.tsx index 346d0d1..f0444bd 100644 --- a/cryptide_project/src/Components/ButtonImgNav.tsx +++ b/cryptide_project/src/Components/ButtonImgNav.tsx @@ -11,7 +11,7 @@ import {basePath} from "../AdressSetup" function ButtonImgNav({ dest, img, text = "" }) { const theme = useTheme(); return ( - {/*target='_blank' ==> ouvre un nouvelle onglet*/ } + {/*target='_blank' ==> ouvre un nouvelle onglet*/ } + ); diff --git a/cryptide_project/src/Pages/EndGame.tsx b/cryptide_project/src/Pages/EndGame.tsx index 125a565..9ebdb59 100644 --- a/cryptide_project/src/Pages/EndGame.tsx +++ b/cryptide_project/src/Pages/EndGame.tsx @@ -181,7 +181,7 @@ function EndGame({lang}: {lang: string}) { - @@ -259,7 +259,7 @@ function EndGame({lang}: {lang: string}) { - @@ -322,7 +322,7 @@ function EndGame({lang}: {lang: string}) { - diff --git a/cryptide_project/src/Pages/Home.tsx b/cryptide_project/src/Pages/Home.tsx index 2cd7af4..1950512 100644 --- a/cryptide_project/src/Pages/Home.tsx +++ b/cryptide_project/src/Pages/Home.tsx @@ -83,7 +83,7 @@ function Home() { Si un joueur place un jeton carré, le questionneur doit également jouer son jeu en plaçant un jeton carré de sa couleur sur un nœud du graphique. La contre-manipulation devient ainsi une arme redoutable pour détourner l'accusation et semer la confusion. Pour en savoir plus, plongez-vous dans les détails de ce passionnant récit sur une autre page.

-
Pour des informations plus détaillées, consulter les règles.
+
Pour des informations plus détaillées, consulter les règles.

@@ -116,7 +116,7 @@ function Home() { {/* */}
- { if (cptNavigation % 2 == 0){ if (navigationType.toString() == "POP"){ socket.emit("player quit") - navigate(`${basePath}/`) + navigate(``) } } @@ -513,7 +513,7 @@ const handleBlurIndice = () => { {/* //? redirection impossible apparament (securité des navigateur */} - + - + diff --git a/cryptide_project/src/Pages/Lobby.tsx b/cryptide_project/src/Pages/Lobby.tsx index c143f9d..327b004 100644 --- a/cryptide_project/src/Pages/Lobby.tsx +++ b/cryptide_project/src/Pages/Lobby.tsx @@ -144,7 +144,7 @@ function Lobby() { gameStarted = true //socket.off("player left") //socket.off("new player") - navigate(`${basePath}/game?solo=false&daily=false`); + navigate(`game?solo=false&daily=false`); }); @@ -181,7 +181,7 @@ function Lobby() { setGameStartData(true) first = true gameStarted = true - navigate(`${basePath}/game?solo=false&daily=false`) + navigate(`game?solo=false&daily=false`) }); socket.on("new player", (tab) =>{ @@ -194,15 +194,15 @@ function Lobby() { }); socket.on("room full", () => { - navigate(`${basePath}/`) + navigate(``) }) socket.on("game started", () => { - navigate(`${basePath}/`) + navigate(``) }) socket.on("game already started", () => { - navigate(`${basePath}/`) + navigate(``) }) socket.on("player left", (tab, i) => { diff --git a/cryptide_project/src/Pages/LoginForm.tsx b/cryptide_project/src/Pages/LoginForm.tsx index c484498..934b7ca 100644 --- a/cryptide_project/src/Pages/LoginForm.tsx +++ b/cryptide_project/src/Pages/LoginForm.tsx @@ -37,7 +37,7 @@ const SignIn = () => { setShowConfirmation(true); setTimeout(async () => { await login(); - navigate(`${basePath}/`); + navigate(``); }, 1250); } } catch (error: any) { @@ -80,7 +80,7 @@ const SignIn = () => {

- Pas encore inscrit ? + Pas encore inscrit ?

diff --git a/cryptide_project/src/Pages/NewPlay.tsx b/cryptide_project/src/Pages/NewPlay.tsx index f1a44e5..80d6b9d 100644 --- a/cryptide_project/src/Pages/NewPlay.tsx +++ b/cryptide_project/src/Pages/NewPlay.tsx @@ -102,7 +102,7 @@ function NewPlay() { setIndicesData(choosenIndices) setIndicesData(choosenIndices) setGameStartData(true) - navigate(`${basePath}/game?solo=true&daily=false`); + navigate(`game?solo=true&daily=false`); } @@ -115,7 +115,7 @@ function NewPlay() { } function launchTuto(){ - navigate(`${basePath}/tutorial`); + navigate(`tutorial`); } @@ -142,7 +142,7 @@ function NewPlay() { }, [room, navigate]); const goBack = () => { - navigate(`${basePath}/lobby?room=${goBackRoom}`) + navigate(`lobby?room=${goBackRoom}`) } @@ -165,7 +165,7 @@ function NewPlay() { setIndicesData(choosenIndices) setIndicesData(choosenIndices) setGameStartData(true) - navigate(`${basePath}/game?solo=true&daily=true&difficulty=easy`); + navigate(`game?solo=true&daily=true&difficulty=easy`); setShowOverlay(false); }; @@ -180,7 +180,7 @@ function NewPlay() { setGameStartData(true) - navigate(`${basePath}/game?solo=true&daily=true&difficulty=intermediate`); + navigate(`game?solo=true&daily=true&difficulty=intermediate`); if (first){ first = false const map = EnigmeDuJourCreator.createEnigme(networkPerson, choosenIndices, choosenPerson, Stub.GenerateIndice()) @@ -203,7 +203,7 @@ function NewPlay() { const map = EnigmeDuJourCreator.createEnigme(networkPerson, choosenIndices, choosenPerson, Stub.GenerateIndice()) setDailyEnigmeData(map) } - navigate(`${basePath}/game?solo=true&daily=true&difficulty=hard`); + navigate(`game?solo=true&daily=true&difficulty=hard`); setShowOverlay(false); }; diff --git a/cryptide_project/src/Pages/Play.tsx b/cryptide_project/src/Pages/Play.tsx index 66a939f..807709e 100644 --- a/cryptide_project/src/Pages/Play.tsx +++ b/cryptide_project/src/Pages/Play.tsx @@ -100,7 +100,7 @@ function Play() { setPersonNetworkData(networkPerson) setIndicesData(choosenIndices) setIndicesData(choosenIndices) - navigate(`${basePath}/game?solo=true&daily=false`); + navigate(`game?solo=true&daily=false`); } @@ -136,7 +136,7 @@ function Play() { }, [room, navigate]); const goBack = () => { - navigate(`${basePath}/lobby?room=${goBackRoom}`) + navigate(`lobby?room=${goBackRoom}`) } @@ -159,7 +159,7 @@ function Play() { setIndicesData(choosenIndices) setIndicesData(choosenIndices) - navigate(`${basePath}/game?solo=true&daily=true&easy=true`); + navigate(`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(`game?solo=true&daily=true&easy=false`); setShowOverlay(false); }; @@ -240,7 +240,7 @@ function Play() { - +
diff --git a/cryptide_project/src/Pages/Profile.tsx b/cryptide_project/src/Pages/Profile.tsx index dda92be..650b533 100644 --- a/cryptide_project/src/Pages/Profile.tsx +++ b/cryptide_project/src/Pages/Profile.tsx @@ -48,7 +48,7 @@ const Profile = () => { const handleLogout = () => { logout(); - navigate(`${basePath}/`); + navigate(``); }; // @ts-ignore @@ -200,7 +200,7 @@ const Profile = () => { } handleCloseDeleteModal(); - navigate(`${basePath}/`) + navigate(``) } else { console.error('Phrase de confirmation incorrecte.'); diff --git a/cryptide_project/src/Pages/SignUpForm.tsx b/cryptide_project/src/Pages/SignUpForm.tsx index 0988471..9d25e86 100644 --- a/cryptide_project/src/Pages/SignUpForm.tsx +++ b/cryptide_project/src/Pages/SignUpForm.tsx @@ -34,7 +34,7 @@ const SignUp = () => { setShowConfirmation(true); setTimeout(() => { - navigate(`${basePath}/login`); // 3 secondes avant de rediriger vers la page de connexion + navigate(`login`); // 3 secondes avant de rediriger vers la page de connexion }, 1250); } } catch (error: any) { @@ -91,7 +91,7 @@ const SignUp = () => {

- Vous avez déjà un compte ? + Vous avez déjà un compte ?

diff --git a/cryptide_project/src/Pages/Tutorial.tsx b/cryptide_project/src/Pages/Tutorial.tsx index f7ea2e4..7795f39 100644 --- a/cryptide_project/src/Pages/Tutorial.tsx +++ b/cryptide_project/src/Pages/Tutorial.tsx @@ -82,7 +82,7 @@ const Tutorial = ({locale, changeLocale}) => { if (cptNavigation % 2 == 0){ if (navigationType.toString() == "POP"){ socket.emit("player quit") - navigate(`${basePath}/`) + navigate(``) } } @@ -365,7 +365,7 @@ const Tutorial = ({locale, changeLocale}) => { - +