diff --git a/frontend/src/hooks/useCollaboration.tsx b/frontend/src/hooks/useCollaboration.tsx index a56d6094..4955c474 100644 --- a/frontend/src/hooks/useCollaboration.tsx +++ b/frontend/src/hooks/useCollaboration.tsx @@ -34,12 +34,14 @@ const useCollaboration = ({ roomId, userId }: UseCollaborationProps) => { const prevTextRef = useRef(text); const awaitingAck = useRef(false); // ack from sending update const awaitingSync = useRef(false); // synced with server + const questionId = "1"; useEffect(() => { const socketConnection = io("http://localhost:5003/"); setSocket(socketConnection); socketConnection.emit(SocketEvents.ROOM_JOIN, roomId, userId); + socketConnection.emit(SocketEvents.QUESTION_SET, questionId); socketConnection.on( SocketEvents.ROOM_UPDATE,