fix: resolve notification routing bug, audio playback format, and backend 500 errors
- Fixed audio playback by downloading a valid mp3 file and importing it directly via Vite. - Fixed the route collision where DELETE /notifications/clear-all was being captured by /notifications/:id. - The notification badge now automatically clears (optimistic UI update) when the tray is opened. - The backend no longer throws a 500 error when querying users during impersonation handoffs.
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
deleteNotification, clearAllNotifications, returnToSuperAdmin
|
||||
} from '../services/dataService';
|
||||
import { User } from '../types';
|
||||
import notificationSound from '../src/assets/audio/notification.mp3';
|
||||
|
||||
const SidebarItem = ({ to, icon: Icon, label, collapsed }: { to: string, icon: any, label: string, collapsed: boolean }) => (
|
||||
<NavLink
|
||||
@@ -592,7 +593,7 @@ export const Layout: React.FC<{ children: React.ReactNode }> = ({ children }) =>
|
||||
{/* Hidden Audio Player for Notifications */}
|
||||
<audio
|
||||
ref={audioRef}
|
||||
src={`${import.meta.env.PROD ? '' : 'http://localhost:3001'}/audio/notification.mp3`}
|
||||
src={notificationSound}
|
||||
preload="auto"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user