Fixed a bug in the Create.jsx page
This commit is contained in:
parent
0124467b6a
commit
301a658287
@ -19,7 +19,7 @@ export const Create = () => {
|
||||
const navigate = useNavigate();
|
||||
|
||||
const {musicEnabled} = useContext(MusicContext);
|
||||
const {groups} = useContext(GroupContext);
|
||||
const {groups, resetGame} = useContext(GroupContext);
|
||||
|
||||
const getRoomCode = () => {
|
||||
socket.emit("CREATE_ROOM", undefined, (data) => {
|
||||
@ -30,6 +30,8 @@ export const Create = () => {
|
||||
useEffect(() => {
|
||||
const timeout = setTimeout(() => getRoomCode(), 1000);
|
||||
|
||||
resetGame();
|
||||
|
||||
return () => clearTimeout(timeout);
|
||||
}, []);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user