don't allow trimmed empty search
This commit is contained in:
parent
8829fccdef
commit
8b88462591
@ -36,7 +36,7 @@ export default function Search () {
|
|||||||
}}
|
}}
|
||||||
className={`w-auto ${styles.active}`}
|
className={`w-auto ${styles.active}`}
|
||||||
onSubmit={async ({ q }) => {
|
onSubmit={async ({ q }) => {
|
||||||
if (q != '') {
|
if (q.trim() !== '') {
|
||||||
router.push(`/search?q=${q}`)
|
router.push(`/search?q=${q}`)
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user