Commit 2b9b53cb authored by Nawasan Wisitsingkhon's avatar Nawasan Wisitsingkhon

fix: search value is empty when refresh;

parent 6e380580
......@@ -91,6 +91,7 @@ function Navbar(props) {
React.useEffect(() => {
setSearch(router.query?.q ?? "");
console.log(router.query);
}, [router]);
const handleMobileMenuClose = () => {
......@@ -325,6 +326,7 @@ function Navbar(props) {
className="hover:border border-gray-300 hover:border-solid rounded duration-200"
placeholder="ค้นหา…"
inputProps={{ "aria-label": "search" }}
value={search}
onChange={(e) => {
return onUpdateSearch(e.target.value);
}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment