diff --git a/components/recent-header.js b/components/recent-header.js index adf1308b7..f65e0759d 100644 --- a/components/recent-header.js +++ b/components/recent-header.js @@ -3,7 +3,9 @@ import BootstrapForm from 'react-bootstrap/Form' import { Select } from './form' import { useRouter } from 'next/router' -function ActiveBountiesCheckbox ({ router, prefix }) { +function ActiveBountiesCheckbox ({ prefix }) { + const router = useRouter() + const onChange = (e) => { const url = new URL(prefix + '/recent/bounties', window.location.origin) if (e.target.checked) { @@ -49,7 +51,7 @@ export default function RecentHeader ({ type, sub }) { noForm onChange={(_, e) => router.push(prefix + (e.target.value === 'posts' ? '/recent' : `/recent/${e.target.value}`))} /> - {type === 'bounties' ? : (null)} + {type === 'bounties' ? : (null)} )