From 493e43b38b17e3fc401255519fc3636f296c78f2 Mon Sep 17 00:00:00 2001 From: developomp Date: Mon, 9 Aug 2021 22:45:03 +0900 Subject: [PATCH] added query string to url and fixed test and clear buttons --- source/src/pages/Search.tsx | 47 ++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/source/src/pages/Search.tsx b/source/src/pages/Search.tsx index ecaaa98..4f4475d 100644 --- a/source/src/pages/Search.tsx +++ b/source/src/pages/Search.tsx @@ -114,7 +114,7 @@ function _Search() { const [postCards, setPostCards] = useState([]) - const [searchInput, setSearchInput] = useState("") + const [searchInput, setSearchInput] = useState(query.query) return ( <> @@ -165,12 +165,29 @@ function _Search() { setSearchInput(event.target.value) } />