don't allow trimmed empty search

This commit is contained in:
keyan 2022-02-02 16:05:09 -06:00
parent 8829fccdef
commit 8b88462591
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ export default function Search () {
}}
className={`w-auto ${styles.active}`}
onSubmit={async ({ q }) => {
if (q != '') {
if (q.trim() !== '') {
router.push(`/search?q=${q}`)
}
}}