'use client' import Link from 'next/link' import { useRouter } from 'next/navigation' import { useAuthStore } from '@/store/authStore' import { useToast } from './ui/toast' import NotificationBell from './NotificationBell' export default function Navbar() { const router = useRouter() const { user, isAuthenticated, logout } = useAuthStore() const { showToast } = useToast() const handleLogout = async () => { try { await logout() showToast('Logged out successfully', 'success') router.push('/login') } catch (error) { showToast('Failed to logout', 'error') } } if (!isAuthenticated) return null return ( ) }