From 4f586adf0afdfef676d96c8252d537e33ee90ca6 Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa <72977554+Cristhianzl@users.noreply.github.com> Date: Thu, 4 Jul 2024 17:10:26 -0300 Subject: [PATCH] fix: remove uneceessary logic to disable button on search components/flows (#2540) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ♻️ (index.tsx): simplify disableInputSearch logic by removing redundant conditions --- .../components/inputSearchComponent/index.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/frontend/src/pages/MainPage/components/myCollectionComponent/components/inputSearchComponent/index.tsx b/src/frontend/src/pages/MainPage/components/myCollectionComponent/components/inputSearchComponent/index.tsx index 898ad84a8..7b7634118 100644 --- a/src/frontend/src/pages/MainPage/components/myCollectionComponent/components/inputSearchComponent/index.tsx +++ b/src/frontend/src/pages/MainPage/components/myCollectionComponent/components/inputSearchComponent/index.tsx @@ -22,14 +22,8 @@ const InputSearchComponent = ({ }: InputSearchComponentProps) => { const pagePath = window.location.pathname; const allFlows = useFlowsManagerStore((state) => state.allFlows); - const searchFlowsComponents = useFlowsManagerStore( - (state) => state.searchFlowsComponents, - ); - const disableInputSearch = - loading || - !allFlows || - (allFlows?.length === 0 && searchFlowsComponents === ""); + const disableInputSearch = loading || !allFlows; const getSearchPlaceholder = () => { if (pagePath.includes("flows")) {