Added functionallity to start a new Game
This commit is contained in:
Marces Zastrow
2024-12-19 11:08:22 +01:00
parent 6c6feb0185
commit 5a46333bfd
5 changed files with 163 additions and 4 deletions
+7 -2
View File
@@ -1,11 +1,12 @@
import React, { useState } from 'react';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; // Use Routes here
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import './App.css';
import Header from './components/header'; // Make sure the import path is correct
import Header from './components/header';
import Home from './pages/home';
import Login from './pages/login';
import Register from './pages/register';
import JoinGame from './pages/joinGame';
import StartGame from './pages/startGame';
function App() {
const [isLoggedIn, setIsLoggedIn] = useState(false);
@@ -44,6 +45,10 @@ function App() {
path="joinGame"
element={<JoinGame isLoggedIn={isLoggedIn} />}
/>
<Route
path="/startGame"
element={<StartGame isLoggedIn={isLoggedIn} />}
/>
</Routes>
</div>
</Router>