Skip to content

Commit

Permalink
feat(develop): 메시지 이벤트 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Doyu-Lee committed Jan 12, 2024
1 parent 695bced commit d08f418
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion registerServiceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ import { register } from "register-service-worker";

export function SW() {
// if (process.env.NODE_ENV === "production") {
navigator.serviceWorker.addEventListener("message", (event) => {
if (event.data.includes("docent")) {
window.location.href = event.data;
}
});

// console.log(navigator);
register(`/service-worker.js`, {
ready() {
// console.log(
Expand Down

0 comments on commit d08f418

Please sign in to comment.