Update ChatNotifications.tsx

This commit is contained in:
NotII
2025-03-08 05:45:49 +00:00
parent c3018c4fce
commit 47e23caf66

View File

@@ -27,9 +27,7 @@ export default function ChatNotifications() {
const [chatMetadata, setChatMetadata] = useState<Record<string, { buyerId: string }>>({}); const [chatMetadata, setChatMetadata] = useState<Record<string, { buyerId: string }>>({});
const audioRef = useRef<HTMLAudioElement | null>(null); const audioRef = useRef<HTMLAudioElement | null>(null);
// Initialize audio element
useEffect(() => { useEffect(() => {
// Create audio element for notification sound
audioRef.current = new Audio('/notification.mp3'); audioRef.current = new Audio('/notification.mp3');
// Fallback if notification.mp3 doesn't exist - use browser API for a simple beep // Fallback if notification.mp3 doesn't exist - use browser API for a simple beep