From fffc213cbf9cbff23a2beb3790049ebdda235596 Mon Sep 17 00:00:00 2001 From: Hyein Jeong Date: Wed, 4 Dec 2024 02:32:38 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[FE][Fix]=20#350=20:=20HostView=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=9C=A0=EC=A0=80=20=ED=99=95=EC=9D=B8=20=EC=8B=9C?= =?UTF-8?q?=20=EC=9C=A0=EC=A0=80=EC=9D=98=20=ED=98=84=EC=9E=AC=20=EC=9C=84?= =?UTF-8?q?=EC=B9=98=EA=B0=80=20=EA=B0=90=EC=B6=B0=EC=A7=80=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - HostView에서 유저 확인 시 유저의 현재 위치가 감춰지지 않는 문제 해결 --- frontend/src/pages/HostView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/HostView.tsx b/frontend/src/pages/HostView.tsx index 5b92c73..d146944 100644 --- a/frontend/src/pages/HostView.tsx +++ b/frontend/src/pages/HostView.tsx @@ -204,7 +204,7 @@ export const HostView = () => { } else { setFilteredOtherLocations(otherLocations.filter(el => el.guestId === clickedId)); } - }, [clickedId]); + }, [clickedId, ws, otherLocations]); return (
@@ -221,7 +221,7 @@ export const HostView = () => { {lat && lng ? ( // eslint-disable-next-line no-nested-ternary mapProps ? ( - otherLocations ? ( + otherLocations && filteredOtherLocations ? ( Date: Wed, 4 Dec 2024 02:33:25 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[FE][Fix]=20guest=EC=9D=98=20=EC=9C=84?= =?UTF-8?q?=EC=B9=98=20=EC=B4=88=EA=B8=B0=EA=B0=92=20=EB=B0=9B=EC=95=84?= =?UTF-8?q?=EC=98=A4=EC=A7=80=20=EB=AA=BB=ED=95=98=EB=8A=94=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - guest의 위치 초기값 받아오지 못하는 문제 해결 --- frontend/src/pages/GuestView.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/pages/GuestView.tsx b/frontend/src/pages/GuestView.tsx index 89f17de..9c22b81 100644 --- a/frontend/src/pages/GuestView.tsx +++ b/frontend/src/pages/GuestView.tsx @@ -43,6 +43,13 @@ export const GuestView = () => { console.log('WebSocket connection established'); }; + ws.send( + JSON.stringify({ + type: 'location', + location: { lat, lng, alpha }, + }), + ); + wsRef.current = ws; }, [location]);