From 866859f74ece35ded80127b856a37481229db52f Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Mon, 12 Feb 2024 23:41:25 -0800 Subject: [PATCH] forgot to run onSubmit callback on enter lol --- src/app/components/SearchBar.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/components/SearchBar.tsx b/src/app/components/SearchBar.tsx index 6f6b562..0e98d1f 100644 --- a/src/app/components/SearchBar.tsx +++ b/src/app/components/SearchBar.tsx @@ -20,6 +20,7 @@ export default function SearchBar({ const handleKeyPress = (e: React.KeyboardEvent) => { if (e.key === 'Enter') { router.push(`/search?q=${encodeURIComponent(searchInput)}`) + onSubmit && onSubmit() } }