Merge pull request #81 from johnpaulkiser/patch-1

Don't submit empty search queries
This commit is contained in:
Keyan 2022-02-02 16:01:05 -06:00 committed by GitHub
commit 2e28c95c39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

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