Spaces:
Sleeping

axeronis commited on
Commit
4b5854b
·
1 Parent(s): b5b0f8b

fix: Increase Sidebar Header z-index to fix dropdown stacking

Browse files
frontend/components/NotificationBell.tsx CHANGED
@@ -16,12 +16,18 @@ interface Notification {
16
  lead_id: string
17
  }
18
 
19
- export default function NotificationBell() {
 
 
 
 
20
  const router = useRouter()
21
  const [unreadCount, setUnreadCount] = useState(0)
22
  const [notifications, setNotifications] = useState<Notification[]>([])
23
  const [isOpen, setIsOpen] = useState(false)
24
  const [loading, setLoading] = useState(false)
 
 
25
 
26
  // Fetch unread count
27
  useEffect(() => {
@@ -142,7 +148,12 @@ export default function NotificationBell() {
142
  animate={{ opacity: 1, scale: 1, y: 0 }}
143
  exit={{ opacity: 0, scale: 0.95, y: 10 }}
144
  transition={{ duration: 0.2 }}
145
- className="absolute right-0 mt-3 w-80 sm:w-96 bg-white rounded-2xl shadow-xl border border-slate-100 overflow-hidden z-50 origin-top-right"
 
 
 
 
 
146
  >
147
  {/* Header */}
148
  <div className="px-4 py-3 border-b border-slate-100 flex items-center justify-between bg-white/50 backdrop-blur-sm">
 
16
  lead_id: string
17
  }
18
 
19
+ interface NotificationBellProps {
20
+ align?: 'right' | 'left' | 'right-side'
21
+ }
22
+
23
+ export default function NotificationBell({ align = 'right' }: NotificationBellProps) {
24
  const router = useRouter()
25
  const [unreadCount, setUnreadCount] = useState(0)
26
  const [notifications, setNotifications] = useState<Notification[]>([])
27
  const [isOpen, setIsOpen] = useState(false)
28
  const [loading, setLoading] = useState(false)
29
+ const containerRef = useState<HTMLDivElement | null>(null)
30
+
31
 
32
  // Fetch unread count
33
  useEffect(() => {
 
148
  animate={{ opacity: 1, scale: 1, y: 0 }}
149
  exit={{ opacity: 0, scale: 0.95, y: 10 }}
150
  transition={{ duration: 0.2 }}
151
+ className={cn(
152
+ "absolute mt-3 w-80 sm:w-96 bg-white rounded-2xl shadow-xl border border-slate-100 overflow-hidden z-[100]",
153
+ align === 'right' ? "right-0 origin-top-right" :
154
+ align === 'left' ? "left-0 origin-top-left" :
155
+ "left-full top-0 ml-4 origin-top-left" // right-side
156
+ )}
157
  >
158
  {/* Header */}
159
  <div className="px-4 py-3 border-b border-slate-100 flex items-center justify-between bg-white/50 backdrop-blur-sm">
frontend/components/Sidebar.tsx CHANGED
@@ -75,12 +75,12 @@ export function Sidebar() {
75
  initial="hidden"
76
  animate="visible"
77
  variants={sidebarVariants}
78
- className="w-72 bg-[#0F172A] border-r border-slate-800 flex flex-col font-['Inter'] relative overflow-hidden shrink-0 h-screen sticky top-0"
79
  >
80
  {/* Background Glow Effect - Removed for better visibility */}
81
 
82
  {/* Logo Section */}
83
- <div className="p-6 border-b border-slate-800 relative z-10">
84
  <div className="flex items-center justify-between gap-2">
85
  <Link href="/dashboard" className="flex items-center gap-3 group flex-1">
86
  <div className="relative">
@@ -98,7 +98,7 @@ export function Sidebar() {
98
  </Link>
99
 
100
  {/* Notification Bell */}
101
- <NotificationBell />
102
  </div>
103
  </div>
104
 
 
75
  initial="hidden"
76
  animate="visible"
77
  variants={sidebarVariants}
78
+ className="w-72 bg-[#0F172A] border-r border-slate-800 flex flex-col font-['Inter'] relative shrink-0 h-screen sticky top-0"
79
  >
80
  {/* Background Glow Effect - Removed for better visibility */}
81
 
82
  {/* Logo Section */}
83
+ <div className="p-6 border-b border-slate-800 relative z-50">
84
  <div className="flex items-center justify-between gap-2">
85
  <Link href="/dashboard" className="flex items-center gap-3 group flex-1">
86
  <div className="relative">
 
98
  </Link>
99
 
100
  {/* Notification Bell */}
101
+ <NotificationBell align="right-side" />
102
  </div>
103
  </div>
104