From bc7a4f21e387e7b1a6b213db3c2bb328b6c0ad70 Mon Sep 17 00:00:00 2001 From: "lkh14011424@gmail.com" Date: Wed, 25 Sep 2024 12:37:57 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[feat/#46]=20=EB=AA=A8=EB=8B=88=ED=84=B0?= =?UTF-8?q?=EB=A7=81=20=EC=A7=84=EC=9E=85=20=EC=8B=9C,=20=EC=95=8C?= =?UTF-8?q?=EB=A6=BC=20=EA=B6=8C=ED=95=9C=20=EB=B0=94=EB=A1=9C=20=ED=99=95?= =?UTF-8?q?=EC=9D=B8=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/usePushNotification.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hooks/usePushNotification.ts b/src/hooks/usePushNotification.ts index 8b27397..b1481c9 100644 --- a/src/hooks/usePushNotification.ts +++ b/src/hooks/usePushNotification.ts @@ -52,8 +52,7 @@ const usePushNotification = (): UsePushNotificationResult => { useEffect(() => { // 컴포넌트가 마운트될 때 권한 상태 확인 if ("Notification" in window) { - handlePermissionChange(Notification.permission) - + requestNotificationPermission() // 권한 변경 감지 navigator.permissions .query({ name: "notifications" as PermissionName }) From b74054d0a5b7751f4347ac3b2664ddbc71b6ec38 Mon Sep 17 00:00:00 2001 From: "lkh14011424@gmail.com" Date: Wed, 25 Sep 2024 13:30:42 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[feat/#46]=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20=EB=A1=9C=EA=B7=B8=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PoseDetector.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/PoseDetector.tsx b/src/components/PoseDetector.tsx index 9e62912..342b41f 100644 --- a/src/components/PoseDetector.tsx +++ b/src/components/PoseDetector.tsx @@ -6,7 +6,6 @@ import { useGuidePopup } from "@/hooks/useGuidePopup" import { useSendPose } from "@/hooks/usePoseMutation" import usePushNotification from "@/hooks/usePushNotification" import { useCreateSnaphot } from "@/hooks/useSnapshotMutation" -import { useNotificationStore } from "@/store/NotificationStore" import { useSnapShotStore } from "@/store/SnapshotStore" import type { pose } from "@/utils/detector" import { detectHandOnChin, detectSlope, detectTailboneSit, detectTextNeck } from "@/utils/detector" @@ -125,9 +124,7 @@ const PoseDetector: React.FC = () => { ): void => { if (condition && isSnapShotSaved) { if (!timerRef.current) { - console.log(poseType, "start") timerRef.current = setInterval(() => { - console.log("start") if (resultRef.current) { const { keypoints, score } = resultRef.current[0] const req = { snapshot: { keypoints, score }, type: poseType } @@ -336,6 +333,9 @@ const PoseDetector: React.FC = () => { openPopup() } + useEffect(() => { + console.log(notification) + }, [notification]) return ( <> {isScriptError ? (