diff --git a/client/src/pages/Game/Game.jsx b/client/src/pages/Game/Game.jsx
index 82a6335..d6a26cb 100644
--- a/client/src/pages/Game/Game.jsx
+++ b/client/src/pages/Game/Game.jsx
@@ -12,7 +12,7 @@ export const Game = () => {
const {groups, allGroups} = useContext(GroupContext);
const [currentState, setCurrentState] = useState("hint");
-
+ const [currentRound, setCurrentRound] = useState(0);
const {musicEnabled} = useContext(MusicContext);
@@ -24,6 +24,10 @@ export const Game = () => {
return () => clearTimeout(timeout);
}, []);
+ useEffect(() => {
+ if (currentState === "waiting") setCurrentRound(current => current + 1);
+ }, [currentState]);
+
if (groups.length === 0 && allGroups.length === 0)
return ;
@@ -37,7 +41,7 @@ export const Game = () => {
>}
{currentState === "waiting" && }
- {currentState === "calculate" && }
+ {currentState === "calculate" && }
)
}
\ No newline at end of file