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:
parent
2b8d314e30
commit
4f586adf0a
1 changed files with 1 additions and 7 deletions
|
|
@ -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")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue