From 2d37df6f335673c28d137519c11c9d50dacba038 Mon Sep 17 00:00:00 2001 From: JP <15898511+johnpaulkiser@users.noreply.github.com> Date: Fri, 28 Jan 2022 18:29:46 -0500 Subject: [PATCH] Don't submit empty search queries --- components/search.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/search.js b/components/search.js index a0c27d2a..afce3ff6 100644 --- a/components/search.js +++ b/components/search.js @@ -36,7 +36,9 @@ export default function Search () { }} className={`w-auto ${styles.active}`} onSubmit={async ({ q }) => { - router.push(`/search?q=${q}`) + if (q != '') { + router.push(`/search?q=${q}`) + } }} >