navbar UI improved

This commit is contained in:
Daniel
2023-06-07 23:04:50 +03:30
parent 35a8d74943
commit 39abb09002
7 changed files with 35 additions and 70 deletions
+3 -1
View File
@@ -34,6 +34,8 @@ export default function Search() {
placeholder="Search for Links"
value={searchQuery}
onChange={(e) => {
e.target.value.includes("%") &&
console.log("The search query should not contain '%'.");
setSearchQuery(e.target.value.replace("%", ""));
}}
onKeyDown={(e) =>
@@ -41,7 +43,7 @@ export default function Search() {
router.push("/search/" + encodeURIComponent(searchQuery))
}
autoFocus={searchBox}
className="border border-sky-100 rounded-md pl-10 py-2 pr-2 w-44 sm:w-60 focus:border-sky-500 sm:focus:w-80 hover:border-sky-500 duration-100 outline-none"
className="border border-sky-100 rounded-md pl-10 py-2 pr-2 w-44 sm:w-60 focus:border-sky-500 md:focus:w-80 hover:border-sky-500 duration-100 outline-none"
/>
</div>
);