import { memo, useCallback } from 'react'; import { Link, useNavigate } from 'react-router-dom'; import SearchBox from './SearchBox'; import { useVisitor } from './VisitorContext'; import Avatar from './Avatar'; 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);