'use client';
import { useEffect } from 'react';
import logger from '@/utils/logger';

export default function ServiceWorkerRegister() {
  useEffect(() => {
    if ('serviceWorker' in navigator) {
      navigator.serviceWorker
        .register('/sw.js')
        .catch((err) => logger.error('Service worker registration failed:', err));
    }
  }, []);

  return null;
}
