-
-
- {!isChatDetailPage && !isAdminPage && (
-
- )}
-
- {children}
-
+ <>
+
+
+
+
+ {!isChatDetailPage && !isAdminPage && (
+
+ )}
+
+ {children}
+
+
-
+ >
)
}
diff --git a/components/modals/broadcast-dialog.tsx b/components/modals/broadcast-dialog.tsx
index 9880914..fd08064 100644
--- a/components/modals/broadcast-dialog.tsx
+++ b/components/modals/broadcast-dialog.tsx
@@ -83,6 +83,11 @@ export default function BroadcastDialog({ open, setOpen }: BroadcastDialogProps)
};
const sendBroadcast = async () => {
+ // Prevent duplicate sends
+ if (isSending) {
+ return;
+ }
+
if ((!broadcastMessage || !broadcastMessage.trim()) && !selectedImage) {
toast.warning("Please provide a message or image to broadcast.");
return;
diff --git a/components/notifications/OrderNotifications.tsx b/components/notifications/OrderNotifications.tsx
index d10f488..1fff6e8 100644
--- a/components/notifications/OrderNotifications.tsx
+++ b/components/notifications/OrderNotifications.tsx
@@ -33,9 +33,9 @@ export default function OrderNotifications() {
const audioRef = useRef
(null);
useEffect(() => {
- audioRef.current = new Audio('/hohoho.mp3');
+ audioRef.current = new Audio('/notification.mp3');
- // Fallback if hohoho.mp3 doesn't exist
+ // Fallback if notification.mp3 doesn't exist
audioRef.current.addEventListener('error', () => {
audioRef.current = null;
});
diff --git a/lib/notification-context.tsx b/lib/notification-context.tsx
index 9b97c74..0a500fe 100644
--- a/lib/notification-context.tsx
+++ b/lib/notification-context.tsx
@@ -92,7 +92,7 @@ export function NotificationProvider({ children }: NotificationProviderProps) {
}
// Initialize audio
- audioRef.current = new Audio('/hohoho.mp3');
+ audioRef.current = new Audio('/notification.mp3');
audioRef.current.addEventListener('error', () => {
audioRef.current = null;
});