+
Added functionallity to start a new Game
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user