From 880b40fd5a1aeabbab6046433f252bc1784b470e Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 21 Apr 2023 11:56:11 +0100 Subject: [PATCH] added search on submit --- src/components/Search.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/Search.jsx b/src/components/Search.jsx index 21fcbd9..ce95e24 100644 --- a/src/components/Search.jsx +++ b/src/components/Search.jsx @@ -12,16 +12,21 @@ export default function Search( { setQuery } ) { setQuery(inputText) }; +let submitHandler = (e) => { + e.preventDefault(); + setQuery(inputText) +} return (
{/*
*/} -
+