File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
apps/client/src/components/qna Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { IoClose, IoShareSocialOutline } from 'react-icons/io5';
66
77import { useModal } from '@/features/modal' ;
88import { postSessionTerminate , useSessionStore } from '@/features/session' ;
9+ import { useSocket } from '@/features/socket' ;
910import { useToastStore } from '@/features/toast' ;
1011
1112import {
@@ -29,6 +30,8 @@ function QuestionList() {
2930 setSelectedQuestionId,
3031 } = useSessionStore ( ) ;
3132
33+ const socket = useSocket ( ) ;
34+
3235 const { addToast } = useToastStore ( ) ;
3336
3437 const { Modal : CreateQuestion , openModal : openCreateQuestionModal } =
@@ -48,6 +51,7 @@ function QuestionList() {
4851 postSessionTerminate ( { sessionId, token : sessionToken } )
4952 . then ( ( response ) => {
5053 if ( response . expired ) {
54+ socket ?. disconnect ( ) ;
5155 setExpired ( true ) ;
5256 addToast ( {
5357 type : 'SUCCESS' ,
You can’t perform that action at this time.
0 commit comments