diff --git a/src/pages/GamePage/GamePage.tsx b/src/pages/GamePage/GamePage.tsx index 2c50f81a..0088d45a 100644 --- a/src/pages/GamePage/GamePage.tsx +++ b/src/pages/GamePage/GamePage.tsx @@ -14,14 +14,8 @@ const GamePage = () => { const navigate = useNavigate(); const { roomId, setRoomInfo, roomInfo } = useRoomInfoStore(); - const { - publishGameRoom, - // onIngameConnected, - // publishIngame, - // handleConnectIngame, - stompClient, - ingameSubscription, - } = useWebsocket(roomId); + const { publishGameRoom, stompClient, ingameSubscription } = + useWebsocket(roomId); const { gameRoomRes, isRoomWsError, didAdminStart, allMembers } = useGameWaitingRoomStore(); @@ -120,15 +114,3 @@ const GamePage = () => { ); }; export default GamePage; - -/* -useWebsocket 분리.. -처음 GamePage 들어오면 useWebsocket 연결하면서 게임대기룸 웹소켓 연결함 -인게임 시작되면 인게임 웹소켓도 연결해야함. 교체아님 쌓여야함 -인게임 종료되면 인게임 웹소켓 끊어야함!!! <- 쌓이지 않게 -인게임 웹소켓을 분리하고 싶다.. - -구상1 -usWebsocekt에서 ingameSubscription를 반환한다. -이걸로 인게임 unsubscribe 해야해서 .. -*/ diff --git a/src/pages/GamePage/IngameWebsocketLayer.tsx b/src/pages/GamePage/IngameWebsocketLayer.tsx index 1f9237b5..59c3e438 100644 --- a/src/pages/GamePage/IngameWebsocketLayer.tsx +++ b/src/pages/GamePage/IngameWebsocketLayer.tsx @@ -10,9 +10,6 @@ import useIngameWebsocket from './hooks/useIngameWebsocket'; interface IngameWebsocketLayerProps { userId: number; - // publishIngame: PublishIngameType; - // onIngameConnected: () => void; - // handleConnectIngame: (roomId: number) => void; stompClient: MutableRefObject; ingameSubscription: MutableRefObject; }