From bf314b2e7e4704bbd5577ee5e082f684d5729f07 Mon Sep 17 00:00:00 2001 From: jiohjung98 Date: Sun, 9 Jun 2024 15:53:26 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=82=AC=ED=8C=8C=EB=A6=AC,=20=ED=81=AC?= =?UTF-8?q?=EB=A1=AC=20=EC=84=A4=EC=B9=98=EC=95=B1=20=EA=B5=AC=EB=B6=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/map/UseMap.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/map/UseMap.tsx b/src/components/map/UseMap.tsx index 189caea..72b371c 100644 --- a/src/components/map/UseMap.tsx +++ b/src/components/map/UseMap.tsx @@ -28,12 +28,12 @@ const UseMap: React.FC = () => { const [branchCount, SetBranchCount] = useState(0); const [canBranchCount, SetCanBranchCount] = useState(0); const [isIOS, setIsIOS] = useState(false); + const [isStandalone, setIsStandalone] = useState(false); useEffect(() => { const userAgent = window.navigator.userAgent; - if (/iPad|iPhone|iPod/.test(userAgent) && !(window as any).MSStream) { - setIsIOS(true); - } + setIsIOS(/iPad|iPhone|iPod/.test(userAgent) && !(window as any).MSStream); + setIsStandalone(window.matchMedia('(display-mode: standalone)').matches); }, []); useEffect(() => { @@ -285,14 +285,13 @@ const UseMap: React.FC = () => { /> - {loading && (