-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import { useEffect } from 'react'; | ||
import { | ||
registerServiceWorker, | ||
requestNotificationPermission, | ||
sendPushNotification | ||
requestNotificationPermission | ||
// sendPushNotification | ||
} from './SetUp'; | ||
|
||
export const Test = () => { | ||
// 푸시 알림 테스트 | ||
const clickPushHandler = () => { | ||
sendPushNotification('매직포스 알림', '알림 가나요?'); | ||
}; | ||
// const clickPushHandler = () => { | ||
// // sendPushNotification('매직포스 알림', '알림 가나요?'); | ||
// }; | ||
useEffect(() => { | ||
registerServiceWorker(); | ||
requestNotificationPermission(); | ||
// 직접 푸시 알림 테스트 | ||
sendPushNotification('테스트 알림', '테스트 알림입니다.'); | ||
// sendPushNotification('테스트 알림', '테스트 알림입니다.'); | ||
}, []); | ||
|
||
return <button onClick={clickPushHandler}>알림 보내기</button>; | ||
// return <button onClick={clickPushHandler}>알림 보내기</button>; | ||
}; |