improved style when overflow

This commit is contained in:
Quentin Roussel
2024-03-29 13:42:48 +01:00
parent a303440544
commit ed2e324a45
5 changed files with 25 additions and 7 deletions

View File

@@ -1,4 +1,5 @@
"use client";
import { TeamReady } from "@/components/admin/teamReady";
import BlueButton, { GreenButton, RedButton } from "@/components/util/button";
import { useAdminConnexion } from "@/context/adminConnexionContext";
import useAdmin from "@/hook/useAdmin";
@@ -9,14 +10,15 @@ export default function AdminPage() {
const { gameState, changeState } = useAdmin();
useProtect();
return (
<div className='h-full bg-gray-200 p-10 flex flex-col justify-between'>
<div className='w-max gap-3 bg-gray-200 p-10 flex flex-col text-center shadow-2xl '>
<div className='min-h-full bg-gray-200 p-10 flex flex-row flex-wrap content-start gap-5'>
<div className='w-max h-1/2 gap-3 bg-gray-200 p-10 flex flex-col text-center shadow-2xl '>
<h2 className="text-2xl">Game state </h2>
<strong className="p-5 bg-gray-900 text-white text-xl rounded">Current : {gameState}</strong>
<RedButton onClick={() => changeState(GameState.SETUP)}>Reset game</RedButton>
<GreenButton onClick={() => changeState(GameState.PLACEMENT)}>Start placement</GreenButton>
<BlueButton onClick={() => changeState(GameState.PLAYING)}>Start game</BlueButton>
</div>
{gameState == GameState.PLACEMENT && <div className="max-h-5/6"><TeamReady /></div>}
</div>
)
}