26 lines
661 B
TypeScript
26 lines
661 B
TypeScript
// "use client";
|
|
|
|
// import { useEffect } from "react";
|
|
|
|
// export function RegisterSW() {
|
|
// useEffect(() => {
|
|
// if ("serviceWorker" in navigator) {
|
|
// window.addEventListener("load", () => {
|
|
// navigator.serviceWorker
|
|
// .register("/sw.js")
|
|
// .then((registration) => {
|
|
// console.log("Service Worker registered: ", registration);
|
|
// })
|
|
// .catch((registrationError) => {
|
|
// console.log(
|
|
// "Service Worker registration failed: ",
|
|
// registrationError
|
|
// );
|
|
// });
|
|
// });
|
|
// }
|
|
// }, []);
|
|
|
|
// return null;
|
|
// }
|