From 54ea2e9cbf37040cf818b89b2bc37b2465fccb91 Mon Sep 17 00:00:00 2001 From: Jeremy <168515712+jeremy-babylonlabs@users.noreply.github.com> Date: Mon, 2 Dec 2024 23:40:00 +1100 Subject: [PATCH] fix fp search clear input (#423) --- package.json | 2 +- .../Staking/FinalityProviders/FinalityProviderSearch.tsx | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 3d646b32..5318409a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "simple-staking", - "version": "0.3.13", + "version": "0.3.14", "private": true, "scripts": { "dev": "next dev", diff --git a/src/app/components/Staking/FinalityProviders/FinalityProviderSearch.tsx b/src/app/components/Staking/FinalityProviders/FinalityProviderSearch.tsx index 15c99b95..84fa5cc2 100644 --- a/src/app/components/Staking/FinalityProviders/FinalityProviderSearch.tsx +++ b/src/app/components/Staking/FinalityProviders/FinalityProviderSearch.tsx @@ -18,9 +18,7 @@ export const FinalityProviderSearch: React.FC = ({ const debouncedSearchTerm = useDebounce(searchTerm, 300); useEffect(() => { - if (debouncedSearchTerm) { - onSearch(debouncedSearchTerm); - } + onSearch(debouncedSearchTerm ?? ""); }, [debouncedSearchTerm, onSearch]); const handleSearch = (e: React.ChangeEvent) => {