Skip to content

Commit

Permalink
chore: simplify
Browse files Browse the repository at this point in the history
Co-authored-by: Leandro <[email protected]>
  • Loading branch information
anxolin and alfetopito authored Dec 17, 2024
1 parent ba214f3 commit d873feb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ const OrdersUserDetailsTable: React.FC<Props> = (props) => {
const [showCanceledAndExpired, setShowCanceledAndExpired] = useState(false)
const [showPreSigning, setShowPreSigning] = useState(false)

const canceledAndExpiredCount = orders ? orders.filter(isExpiredOrCanceled).length : 0
const preSigningCount = orders ? orders.filter((order) => order.status === 'signing').length : 0
const canceledAndExpiredCount = orders?.filter(isExpiredOrCanceled).length || 0
const preSigningCount = orders?.filter((order) => order.status === 'signing').length || 0
const showFilter = canceledAndExpiredCount > 0 || preSigningCount > 0
const allOrdersAreHidden =
orders?.length === (showPreSigning ? 0 : preSigningCount) + (showCanceledAndExpired ? 0 : canceledAndExpiredCount)
Expand Down

0 comments on commit d873feb

Please sign in to comment.