Skip to content

Commit

Permalink
[feat/#46] 모니터링 진입 시, 알림 권한 바로 확인하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
lkhoony committed Sep 25, 2024
1 parent 19a3731 commit bc7a4f2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/hooks/usePushNotification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ const usePushNotification = (): UsePushNotificationResult => {
useEffect(() => {
// 컴포넌트가 마운트될 때 권한 상태 확인
if ("Notification" in window) {
handlePermissionChange(Notification.permission)

requestNotificationPermission()
// 권한 변경 감지
navigator.permissions
.query({ name: "notifications" as PermissionName })
Expand Down

0 comments on commit bc7a4f2

Please sign in to comment.