Update ChatNotifications.tsx
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user