From 622fe2644ade1ee038c7b525f52a952ca276c212 Mon Sep 17 00:00:00 2001 From: Sorin Chis Date: Fri, 15 Mar 2024 15:25:30 +0200 Subject: [PATCH] conditionaly show clear btn --- src/components/SearchRevamp.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/SearchRevamp.js b/src/components/SearchRevamp.js index 960934c..929f293 100644 --- a/src/components/SearchRevamp.js +++ b/src/components/SearchRevamp.js @@ -99,6 +99,7 @@ const SearchRevamp = ({ filter }: Props): Node => { placeholder="Search stake pool" type="text" /> + {searchValue.length > 0 && { setSearchValue(''); @@ -107,6 +108,8 @@ const SearchRevamp = ({ filter }: Props): Node => { > Clear Input + } + ); };