feat: Restrict notifications feature to admin users only in navigation

This commit is contained in:
2025-10-06 16:07:17 +02:00
parent 80a53d5d15
commit e19172d2bb

View File

@@ -96,7 +96,8 @@ const Navigation = () => {
<div className="text-blue-100">{t('navigation.loading')}</div>
) : session ? (
<>
{/* Notifications */}
{/* Notifications - Admin only for now */}
{session?.user?.role === 'admin' && (
<div className="relative" ref={notificationsRef}>
<button
onClick={() => setIsNotificationsOpen(!isNotificationsOpen)}
@@ -126,6 +127,7 @@ const Navigation = () => {
</div>
)}
</div>
)}
{/* User Info */}
<div className="hidden md:flex items-center space-x-3">
@@ -220,7 +222,8 @@ const Navigation = () => {
</div>
</Link>
<div className="flex items-center space-x-2">
{/* Mobile Notifications */}
{/* Mobile Notifications - Admin only for now */}
{session?.user?.role === 'admin' && (
<button
onClick={() => {
setIsNotificationsOpen(!isNotificationsOpen);
@@ -236,6 +239,7 @@ const Navigation = () => {
0
</span>
</button>
)}
<button
onClick={() => {
setIsMobileMenuOpen(false);