commit
This commit is contained in:
parent
7ebfa38753
commit
1c1dd559ef
3 changed files with 12 additions and 5 deletions
7
public/404.html
Normal file
7
public/404.html
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="refresh" content="0; url=/" />
|
||||||
|
</head>
|
||||||
|
<body></body>
|
||||||
|
</html>
|
|
@ -53,7 +53,6 @@ body {
|
||||||
.games {
|
.games {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin: 20px;
|
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,6 +60,7 @@ body {
|
||||||
padding: 30px;
|
padding: 30px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: start;
|
||||||
border-radius: 60px;
|
border-radius: 60px;
|
||||||
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.5);
|
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.5);
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect, useRef } from 'react';
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
@ -13,7 +13,7 @@ export default function Home() {
|
||||||
const [token, setToken] = useState();
|
const [token, setToken] = useState();
|
||||||
const [games, setGames] = useState([]);
|
const [games, setGames] = useState([]);
|
||||||
const [userloading, setUserLoading] = useState(true);
|
const [userloading, setUserLoading] = useState(true);
|
||||||
const [gameLoading, setGameLoading] = useState(true);
|
const [gamesLoading, setGamesLoading] = useState(true);
|
||||||
const [name, setName] = useState("");
|
const [name, setName] = useState("");
|
||||||
const [currentPage, setCurrentPage] = useState(1);
|
const [currentPage, setCurrentPage] = useState(1);
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ export default function Home() {
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error fetching games:", error);
|
console.error("Error fetching games:", error);
|
||||||
} finally {
|
} finally {
|
||||||
setGameLoading(false);
|
setGamesLoading(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ export default function Home() {
|
||||||
<FontAwesomeIcon icon="fa-solid fa-angles-right" />
|
<FontAwesomeIcon icon="fa-solid fa-angles-right" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{gameLoading ? <p>Loading...</p> :
|
{gamesLoading ? <p>Loading...</p> :
|
||||||
<div className='games'>
|
<div className='games'>
|
||||||
{currentGames.map((game) => {
|
{currentGames.map((game) => {
|
||||||
return <Game key={game.id} game={game} token={token} user={user} />
|
return <Game key={game.id} game={game} token={token} user={user} />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue