From 03842b5e402118879c46097202924411f9374033 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Mon, 20 Nov 2023 21:19:06 +0100 Subject: [PATCH] Fixed a bug in the Game.jsx --- client/src/pages/Game/Game.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/pages/Game/Game.jsx b/client/src/pages/Game/Game.jsx index 2bd7a0a..82a6335 100644 --- a/client/src/pages/Game/Game.jsx +++ b/client/src/pages/Game/Game.jsx @@ -9,7 +9,7 @@ import HintSound from "@/common/sounds/hint.mp3"; import {MusicContext} from "@/common/contexts/MusicContext.jsx"; export const Game = () => { - const {groups} = useContext(GroupContext); + const {groups, allGroups} = useContext(GroupContext); const [currentState, setCurrentState] = useState("hint"); @@ -24,7 +24,8 @@ export const Game = () => { return () => clearTimeout(timeout); }, []); - if (groups.length === 0) return ; + if (groups.length === 0 && allGroups.length === 0) + return ; return (