disable register sw
This commit is contained in:
parent
3d9975cbcb
commit
5c430a9733
|
|
@ -1,25 +1,25 @@
|
||||||
"use client";
|
// "use client";
|
||||||
|
|
||||||
import { useEffect } from "react";
|
// import { useEffect } from "react";
|
||||||
|
|
||||||
export function RegisterSW() {
|
// export function RegisterSW() {
|
||||||
useEffect(() => {
|
// useEffect(() => {
|
||||||
if ("serviceWorker" in navigator) {
|
// if ("serviceWorker" in navigator) {
|
||||||
window.addEventListener("load", () => {
|
// window.addEventListener("load", () => {
|
||||||
navigator.serviceWorker
|
// navigator.serviceWorker
|
||||||
.register("/sw.js")
|
// .register("/sw.js")
|
||||||
.then((registration) => {
|
// .then((registration) => {
|
||||||
console.log("Service Worker registered: ", registration);
|
// console.log("Service Worker registered: ", registration);
|
||||||
})
|
// })
|
||||||
.catch((registrationError) => {
|
// .catch((registrationError) => {
|
||||||
console.log(
|
// console.log(
|
||||||
"Service Worker registration failed: ",
|
// "Service Worker registration failed: ",
|
||||||
registrationError
|
// registrationError
|
||||||
);
|
// );
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}, []);
|
// }, []);
|
||||||
|
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue