From 5f4cff89755b5ab25af48f1b59c167d82f44f78b Mon Sep 17 00:00:00 2001 From: mrjvs Date: Tue, 30 Jan 2024 20:39:40 +0100 Subject: [PATCH] Cleanup some styling --- src/components/form/SearchBar.tsx | 7 ++----- src/hooks/useSearchQuery.ts | 4 +--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/components/form/SearchBar.tsx b/src/components/form/SearchBar.tsx index 8a7cfc4a..6ac6128f 100644 --- a/src/components/form/SearchBar.tsx +++ b/src/components/form/SearchBar.tsx @@ -66,12 +66,9 @@ export const SearchBarInput = forwardRef( ref.current?.focus(); } }} - className="cursor-pointer absolute p-1 bottom-0 right-2 top-0 flex justify-center my-auto max-h-10 max-w-10 h-full w-full items-center hover:bg-search-hoverBackground active:scale-110 text-search-icon rounded-full transition duration-100" + className="cursor-pointer hover:text-white absolute bottom-0 right-2 top-0 flex justify-center my-auto h-10 w-10 items-center hover:bg-search-hoverBackground active:scale-110 text-search-icon rounded-full transition-[transform,background-color] duration-200" > - + )} diff --git a/src/hooks/useSearchQuery.ts b/src/hooks/useSearchQuery.ts index 23942c06..425fe4f1 100644 --- a/src/hooks/useSearchQuery.ts +++ b/src/hooks/useSearchQuery.ts @@ -34,9 +34,7 @@ export function useSearchQuery(): [ }; const onUnFocus = (newSearch?: string) => { - // eslint-disable-next-line eqeqeq - const updated = newSearch == undefined ? search : newSearch; - updateParams(updated, true); + updateParams(newSearch ?? search, true); }; return [search, updateParams, onUnFocus];