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