-
-
- Add {type === 'image' ? 'Image' : 'YouTube Video'}
-
-
+ ) : null}
+ >
);
};
diff --git a/src/components/notificationcenter.tsx b/src/components/notificationcenter.tsx
index 35497dbb..71fe0deb 100644
--- a/src/components/notificationcenter.tsx
+++ b/src/components/notificationcenter.tsx
@@ -1,12 +1,24 @@
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-nocheck
'use client';
-import React, { useState, useRef, useEffect } from 'react';
+import React, { useState, useRef, useEffect, useId } from 'react';
import Image from 'next/image';
-import { BellOff, Info, CheckCircle, AlertTriangle, XCircle, Message, Book, Settings, Bell, X } from 'lucide-react';
+import {
+ BellOff,
+ Info,
+ CheckCircle,
+ AlertTriangle,
+ XCircle,
+ Message,
+ Book,
+ Settings,
+ Bell,
+ X,
+} from 'lucide-react';
import { Notification, NotificationType, useNotifications } from '@/providers/Notificationprovider';
import { EmptyState } from '@/components';
import { getDateTimeFormat } from '@/utils/intlCache';
+import { useFocusTrap } from '@/hooks/useFocusTrap';
// ââ€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬
// Icon helpers
@@ -14,12 +26,12 @@ import { getDateTimeFormat } from '@/utils/intlCache';
const TYPE_ICON: Record
= {
info: ,
- success: ,
- warning: ,
- error: ,
- message: ,
- course: ,
- system: ,
+ success: ,
+ warning: ,
+ error: ,
+ message: ,
+ course: ,
+ system: ,
};
function timeAgo(date: Date): string {
@@ -84,7 +96,7 @@ function NotificationItem({ notification, onRead, onClear }: NotificationItemPro
className="notification-item__avatar"
/>
) : (
- {TYPE_ICON[type]}
+ TYPE_ICON[type]
)}
@@ -103,7 +115,7 @@ function NotificationItem({ notification, onRead, onClear }: NotificationItemPro
}}
aria-label="Dismiss notification"
>
-
+
);
@@ -116,16 +128,20 @@ function NotificationItem({ notification, onRead, onClear }: NotificationItemPro
interface NotificationBadgeProps {
count: number;
onClick: () => void;
+ expanded: boolean;
+ controls: string;
}
-export function NotificationBadge({ count, onClick }: NotificationBadgeProps) {
+export function NotificationBadge({ count, onClick, expanded, controls }: NotificationBadgeProps) {
return (