File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import { useReducer } from "react";
16
16
import { updateQnHistoryById } from "../reducers/qnHistoryReducer" ;
17
17
import qnHistoryReducer , { initialQHState } from "../reducers/qnHistoryReducer" ;
18
18
import { CollabEvents , collabSocket , leave } from "../utils/collabSocket" ;
19
- import { CommunicationEvents } from "../components/Chat" ;
20
19
import { communicationSocket } from "../utils/communicationSocket" ;
21
20
import useAppNavigate from "../components/UseAppNavigate" ;
22
21
@@ -133,16 +132,7 @@ const CollabProvider: React.FC<{ children?: React.ReactNode }> = (props) => {
133
132
leave ( partner ?. id as string , getMatchId ( ) as string , true ) ;
134
133
135
134
// 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 ( ) ;
146
136
147
137
// Delete match data
148
138
stopMatch ( ) ;
You can’t perform that action at this time.
0 commit comments