From 0eb55d620e8b4e9a61f93839ebbcf5487eefbc4b Mon Sep 17 00:00:00 2001 From: jiohjung98 Date: Sun, 9 Jun 2024 16:15:21 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=9C=84=EC=B9=98=20=EB=AA=A8=EB=8B=AC?= =?UTF-8?q?=20=EC=9E=AC=EC=A1=B0=EC=A0=95=20=EB=B0=8F=20x=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=20=EC=9D=B4=EB=AF=B8=EC=A7=80=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/CloseBtn.svg | 16 ++++++++++++++++ src/components/map/UseMap.tsx | 17 ++++++++--------- 2 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 public/CloseBtn.svg diff --git a/public/CloseBtn.svg b/public/CloseBtn.svg new file mode 100644 index 0000000..4bba680 --- /dev/null +++ b/public/CloseBtn.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/components/map/UseMap.tsx b/src/components/map/UseMap.tsx index 72b371c..6986ae6 100644 --- a/src/components/map/UseMap.tsx +++ b/src/components/map/UseMap.tsx @@ -244,25 +244,24 @@ const UseMap: React.FC = () => { } }; - const handleCurrentLocationTextClick = (e: React.MouseEvent) => { + const handleCurrentLocationTextClick = (e: React.MouseEvent) => { e.stopPropagation(); setShowMessage(false); - const button = document.getElementById('current-location-text'); - if (button) { - button.click(); - } }; + return (
{showMessage && ( <> -
+
더 정확한 접속위치를 확인해보세요! - +
+ closeBtn +
- Current Location + Current Location )} setShowSearchResults(true)} onChange={handleSearchQueryChange} /> @@ -290,7 +289,7 @@ const UseMap: React.FC = () => { onMouseLeave={() => setImageSrc('/map/MapLocation.png')} onClick={handleCurrentLocationClick} > - Current Location + Current Location {loading && (