From d7f17c15b54556306c5837503b5d5c97d6cdd4be Mon Sep 17 00:00:00 2001
From: Pierre Ferreira
Date: Fri, 10 Nov 2023 13:58:23 +0100
Subject: [PATCH] =?UTF-8?q?ajout=20de=20la=20possibilit=C3=A9=20d'affich?=
=?UTF-8?q?=C3=A9=20la=20bar=20de=20navigation=20seulement=20sur=20les=20p?=
=?UTF-8?q?age=20de=20notre=20choix.=20:zap:?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
cryptide_project/src/App.tsx | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/cryptide_project/src/App.tsx b/cryptide_project/src/App.tsx
index 79ac7b2..d90f6aa 100644
--- a/cryptide_project/src/App.tsx
+++ b/cryptide_project/src/App.tsx
@@ -18,7 +18,7 @@ import InfoPage from './Pages/InfoPage';
import AppNavbar from './Components/NavBar';
/* nav */
-import { BrowserRouter, Route, Routes } from "react-router-dom";
+import { BrowserRouter, Route, Routes, useLocation } from "react-router-dom";
/* Style */
import './App.css';
@@ -46,6 +46,11 @@ function App() {
setLocale(newLocale);
};
+
+ //const location = useLocation();
+ const hasNavbarVisible = ["/", "/login", "/signup", "/play", "/lobby", "/endgame"].includes(window.location.pathname);
+
+
return (
//
//
@@ -56,7 +61,8 @@ function App() {
//@ts-ignore
-
+ {/* */}
+ {hasNavbarVisible && }
} />
} />