mirror of
https://github.com/randyjc/Rahoot.git
synced 2026-03-13 20:15:35 +01:00
feat(game): enhance game reconnection logic and improve reset messages
This commit is contained in:
@@ -12,7 +12,7 @@ import Image from "next/image"
|
||||
import { PropsWithChildren } from "react"
|
||||
|
||||
type Props = PropsWithChildren & {
|
||||
statusName: Status
|
||||
statusName: Status | undefined
|
||||
onNext?: () => void
|
||||
manager?: boolean
|
||||
}
|
||||
@@ -21,7 +21,7 @@ const GameWrapper = ({ children, statusName, onNext, manager }: Props) => {
|
||||
const { isConnected } = useSocket()
|
||||
const { player } = usePlayerStore()
|
||||
const { questionStates, setQuestionStates } = useQuestionStore()
|
||||
const next = MANAGER_SKIP_BTN[statusName] || null
|
||||
const next = statusName ? MANAGER_SKIP_BTN[statusName] : null
|
||||
|
||||
useEvent("game:updateQuestion", ({ current, total }) => {
|
||||
setQuestionStates({
|
||||
|
||||
Reference in New Issue
Block a user