fix: remove uneceessary logic to disable button on search components/flows (#2540)

♻️ (index.tsx): simplify disableInputSearch logic by removing redundant conditions
This commit is contained in:
Cristhian Zanforlin Lousa 2024-07-04 17:10:26 -03:00 committed by GitHub
commit 4f586adf0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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")) {