From ea3a6515f4f15afe488e424492c50f8b30fcd44c Mon Sep 17 00:00:00 2001 From: Mayreeel Date: Sat, 5 Aug 2023 08:42:56 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=EC=84=9C=EB=B2=84=20=EC=97=B0?= =?UTF-8?q?=EA=B2=B0=20=EC=97=90=EB=9F=AC=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/PlayerRoomPage.tsx | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/frontend/src/pages/PlayerRoomPage.tsx b/frontend/src/pages/PlayerRoomPage.tsx index 1af038e..7fad6dd 100644 --- a/frontend/src/pages/PlayerRoomPage.tsx +++ b/frontend/src/pages/PlayerRoomPage.tsx @@ -34,7 +34,7 @@ const PlayerRoomPage = observer(() => { const navigate = useNavigate(); const param = useParams(); - const { send, error, ws } = WebsocketStore; + const { send, error } = WebsocketStore; const [IsmodalEOpen, SetismodalEOpen] = useState(false); const [ValueLengthState, SetValueState] = useState(""); const [HintState, SetHintState] = useState(""); @@ -151,7 +151,7 @@ const PlayerRoomPage = observer(() => { if ( roomstate.findIndex( - (item) => !(item.playerId === myId) && item.playerName === inputValue, + (item) => !(item.playerId === myId) && item.playerName === inputValue ) !== -1 ) { SetValueState("동일한 닉네임이 존재해요!"); @@ -191,13 +191,6 @@ const PlayerRoomPage = observer(() => { } }, [error]); - useEffect(() => { - if (!ws) { - alert("서버와의 연결이 끊어졌습니다."); - window.location.href = "/"; - } - }, [ws]); - return (
sketch @@ -251,7 +244,7 @@ const PlayerRoomPage = observer(() => { )}
- ), + ) )}