Files
chat_room/src/components/ServiceWorkerRegister.tsx
T
mobiniqow 93f6ea2f07 Initial commit: dating app web frontend (Next.js)
Phone+OTP auth, staged onboarding, admin-approval-gated home screen,
and the full discovery/match/chat UI (swipe deck with drag gestures,
match modal, profile detail, filters, messages/chat) wired to the
real backend, styled after a Figma dating-app UI kit.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-15 23:25:42 +03:30

15 lines
360 B
TypeScript

"use client";
import { useEffect } from "react";
export function ServiceWorkerRegister() {
useEffect(() => {
if ("serviceWorker" in navigator) {
navigator.serviceWorker.register("/sw.js").catch(() => {
// نصب PWA اختیاریه؛ اگه شکست خورد اپ عادی کار می‌کنه
});
}
}, []);
return null;
}