import { memo, useCallback } from 'react'; import { Link, useNavigate } from 'react-router-dom'; import Icon from './Icon'; import { UserLink } from './UserInfo'; import SearchBox from './SearchBox'; import { useVisitor } from './VisitorContext'; function Header() { const [visitor] = useVisitor(); const navigate = useNavigate(); /** * @param {string} searchString */ let searchAll = useCallback((searchString) => { let location = {}; location.pathname = '/discover'; location.search = `?search=${searchString}`; navigate(location); }, [navigate]); return ( ); } export default memo(Header);