Skip to content

Commit

Permalink
readability
Browse files Browse the repository at this point in the history
  • Loading branch information
vsubhuman committed Jul 13, 2024
1 parent bd958de commit bd636fc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ export default function SwapOrdersPage(props: StoresAndActionsProps): Node {
.map(c => resolveValueOrGetter(c.width ?? 'auto', columnContext))
.join(' ');

const isDisplayOpenOrdersEmpty = openOrders?.length === 0 && !showCompletedOrders;
const isDisplayCompletedOrdersEmpty = completedOrders?.length === 0 && showCompletedOrders;
const isDisplayOpenOrdersEmpty = !showCompletedOrders && openOrders?.length === 0;
const isDisplayCompletedOrdersEmpty = showCompletedOrders && completedOrders?.length === 0;
const safeColumnNames = isDisplayOpenOrdersEmpty || isDisplayCompletedOrdersEmpty ? [] : columnNames;

return (
Expand Down

0 comments on commit bd636fc

Please sign in to comment.