Starting to implement full-stack logic

This commit is contained in:
aronmal 2023-04-12 22:32:40 +02:00
parent 06f0eacc78
commit a32b40395e
Signed by: aronmal
GPG key ID: 816B7707426FC612
13 changed files with 211 additions and 57 deletions

View file

@ -1,8 +1,10 @@
import { gameContext } from "../../pages/_app"
import Icon from "./Icon"
import Player from "./Player"
import { Fragment, useEffect, useState } from "react"
import { Fragment, useContext, useEffect, useState } from "react"
function LobbyFrame({ openSettings }: { openSettings: () => void }) {
const [gameProps, setGameProps] = useContext(gameContext)
const [enemy, setEnemy] = useState(false)
const [dots, setDots] = useState(1)
@ -17,7 +19,7 @@ function LobbyFrame({ openSettings }: { openSettings: () => void }) {
<div className="flex items-center justify-between border-b-2 border-slate-900">
<Icon src="speech_bubble.png">Chat</Icon>
<h1 className="font-farro text-5xl font-medium">
Game-PIN: <span className="underline">3169</span>
Game-PIN: <span className="underline">{gameProps.pin}</span>
</h1>
<Icon src="gear.png" onClick={openSettings}>
Settings