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