Better lobby system
Some checks failed
Build Mau & Deploy Mau / build (push) Failing after 1m17s
Build Mau & Deploy Mau / deploy (push) Has been skipped
Build Mau & Deploy Mau / build (pull_request) Failing after 1m24s
Build Mau & Deploy Mau / deploy (pull_request) Has been skipped

This commit is contained in:
DTieman
2024-04-22 21:52:12 +02:00
parent 4959e197bb
commit d5df884ae8
2 changed files with 50 additions and 20 deletions

View File

@@ -1,7 +1,27 @@
const Lobby = () => {
import {FunctionComponent} from "react";
import {GHButton} from "./Button";
interface Props {
winner: string | undefined;
handleLobbyAction: (action: string) => void;
}
const Lobby: FunctionComponent<Props> = ({winner, handleLobbyAction}) => {
const onStartClick = () => {
console.log('Start Game');
handleLobbyAction("START");
}
// @ts-ignore
return (
<div>
<h1>Lobby</h1>
{
winner &&
<h2>{winner} has won the game!</h2>
}
<GHButton onClick={onStartClick}>Start Game</GHButton>
</div>
);
}