web-humas-fe/app/register-sw.ts

26 lines
661 B
TypeScript
Raw Normal View History

2025-05-26 06:39:00 +00:00
// "use client";
2025-04-24 09:26:01 +00:00
2025-05-26 06:39:00 +00:00
// import { useEffect } from "react";
2025-04-24 09:26:01 +00:00
2025-05-26 06:39:00 +00:00
// 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
// );
// });
// });
// }
// }, []);
2025-04-24 09:26:01 +00:00
2025-05-26 06:39:00 +00:00
// return null;
// }