import { useRouter } from 'next/router' import { Form, Select } from './form' export default function TopHeader ({ cat }) { const router = useRouter() const top = async values => { const what = values.what delete values.what if (values.sort === '') delete values.sort if (values.when === '') delete values.when await router.push({ pathname: `/top/${what}`, query: values }) } return (