Starting to implement full-stack logic
This commit is contained in:
parent
06f0eacc78
commit
a32b40395e
13 changed files with 211 additions and 57 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue