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 && } } /> } />