import { useState, type FormEvent } from 'react' import { Link, useNavigate } from 'react-router-dom' import { useAuth } from '../../features/auth/AuthContext' import { useNotifications } from './useNotifications' export function Navbar() { const { user, logout } = useAuth() const navigate = useNavigate() const [search, setSearch] = useState('') const notifications = useNotifications() function handleSearch(e: FormEvent) { e.preventDefault() if (search.trim()) { navigate(`/users?search=${encodeURIComponent(search.trim())}`) } } return ( ) }