Skip to content

Commit 5cb3d86

Browse files
committed
Merge branch 'development' of https://github.com/guanquann/cs3219-ay2425s1-project-g28 into code-execution-fe
2 parents 798819c + 427b044 commit 5cb3d86

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

frontend/src/contexts/CollabContext.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { useReducer } from "react";
1616
import { updateQnHistoryById } from "../reducers/qnHistoryReducer";
1717
import qnHistoryReducer, { initialQHState } from "../reducers/qnHistoryReducer";
1818
import { CollabEvents, collabSocket, leave } from "../utils/collabSocket";
19-
import { CommunicationEvents } from "../components/Chat";
2019
import { communicationSocket } from "../utils/communicationSocket";
2120
import useAppNavigate from "../components/UseAppNavigate";
2221

@@ -133,16 +132,7 @@ const CollabProvider: React.FC<{ children?: React.ReactNode }> = (props) => {
133132
leave(partner?.id as string, getMatchId() as string, true);
134133

135134
// Leave chat room
136-
communicationSocket.emit(
137-
CommunicationEvents.LEAVE,
138-
getMatchId(),
139-
matchUser?.username
140-
);
141-
communicationSocket.emit(
142-
CommunicationEvents.LEAVE,
143-
getMatchId(),
144-
partner?.username
145-
);
135+
communicationSocket.disconnect();
146136

147137
// Delete match data
148138
stopMatch();

0 commit comments

Comments
 (0)