Skip to content

Commit

Permalink
Merge pull request #1489 from memphisdev/RND-257-indication-for-max-a…
Browse files Browse the repository at this point in the history
…llowed-producer-button-to-clean-disconnected-prods-cons

Indication for max allowed producer + button to clean disconnected pr…
  • Loading branch information
otabek-memphis authored Dec 7, 2023
2 parents dc59213 + 318472e commit a4e01c5
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,10 @@ const Messages = ({ referredFunction }) => {
backgroundColorType="red"
fontSize="12px"
fontWeight="600"
disabled={disableLoaderCleanDisconnectedProducers || stationState?.stationSocketData?.disconnected_producers?.reduce((accumulator, item) => accumulator + item.disconnected_producers_count, 0) === 0}
disabled={disableLoaderCleanDisconnectedProducers ||
stationState?.stationSocketData?.disconnected_producers?.reduce((accumulator, item) => accumulator + item.disconnected_producers_count, 0) === 0 &&
stationState?.stationSocketData?.connected_producers?.reduce((accumulator, item) => accumulator + item.disconnected_producers_count, 0) === 0
}
onClick={() => cleanDisconnectedProducers(stationState?.stationMetaData?.id)}
isLoading={disableLoaderCleanDisconnectedProducers}
tooltip={stationState?.stationSocketData?.disconnected_producers?.reduce((accumulator, item) => accumulator + item.disconnected_producers_count, 0) === 0 && "Nothing to clean"}
Expand Down

0 comments on commit a4e01c5

Please sign in to comment.