diff --git a/src/components/ui/Navigation.js b/src/components/ui/Navigation.js
index 7e26145..a31eb1e 100644
--- a/src/components/ui/Navigation.js
+++ b/src/components/ui/Navigation.js
@@ -4,13 +4,29 @@ import Link from "next/link";
import { usePathname } from "next/navigation";
import { useSession, signOut } from "next-auth/react";
import { useTranslation } from "@/lib/i18n";
-import { useState } from "react";
+import { useState, useEffect, useRef } from "react";
const Navigation = () => {
const pathname = usePathname();
const { data: session, status } = useSession();
const { t } = useTranslation();
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
+ const [isNotificationsOpen, setIsNotificationsOpen] = useState(false);
+ const notificationsRef = useRef(null);
+
+ // Close notifications dropdown when clicking outside
+ useEffect(() => {
+ const handleClickOutside = (event) => {
+ if (notificationsRef.current && !notificationsRef.current.contains(event.target)) {
+ setIsNotificationsOpen(false);
+ }
+ };
+
+ document.addEventListener('mousedown', handleClickOutside);
+ return () => {
+ document.removeEventListener('mousedown', handleClickOutside);
+ };
+ }, []);
const isActive = (path) => {
if (path === "/") return pathname === "/";
@@ -74,12 +90,43 @@ const Navigation = () => {
) : null}
- {/* Right side - User/Auth section */}
+ {/* Right side - Notifications and User/Auth section */}
{status === "loading" ? (
{t('navigation.loading')}
) : session ? (
<>
+ {/* Notifications */}
+
+
+
+ {/* Notifications Dropdown */}
+ {isNotificationsOpen && (
+
+
+
{t('notifications.title')}
+
+
+
+
{t('notifications.noNotifications')}
+
{t('notifications.placeholder')}
+
+
+
+ )}
+
+
{/* User Info */}
@@ -117,7 +164,10 @@ const Navigation = () => {
{/* Mobile menu button */}
{session && (
+ {/* Mobile Notifications */}
+