diff --git a/public/404.html b/public/404.html new file mode 100644 index 0000000..6841b01 --- /dev/null +++ b/public/404.html @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/pages/Home.css b/src/pages/Home.css index 8d1073a..86a1f70 100644 --- a/src/pages/Home.css +++ b/src/pages/Home.css @@ -53,7 +53,6 @@ body { .games { display: flex; flex-direction: column; - margin: 20px; gap: 20px; } @@ -61,6 +60,7 @@ body { padding: 30px; background-color: white; display: flex; + align-items: start; border-radius: 60px; box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.5); justify-content: space-between; diff --git a/src/pages/Home.jsx b/src/pages/Home.jsx index da2fa44..b0d37dc 100644 --- a/src/pages/Home.jsx +++ b/src/pages/Home.jsx @@ -1,4 +1,4 @@ -import { useState, useEffect } from 'react'; +import { useState, useEffect, useRef } from 'react'; import { useNavigate } from "react-router-dom"; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import axios from "axios"; @@ -13,7 +13,7 @@ export default function Home() { const [token, setToken] = useState(); const [games, setGames] = useState([]); const [userloading, setUserLoading] = useState(true); - const [gameLoading, setGameLoading] = useState(true); + const [gamesLoading, setGamesLoading] = useState(true); const [name, setName] = useState(""); const [currentPage, setCurrentPage] = useState(1); @@ -38,7 +38,7 @@ export default function Home() { } catch (error) { console.error("Error fetching games:", error); } finally { - setGameLoading(false); + setGamesLoading(false); } } @@ -106,7 +106,7 @@ export default function Home() { - {gameLoading ?

Loading...

: + {gamesLoading ?

Loading...

:
{currentGames.map((game) => { return