update: finish cancel all orders feature
This commit is contained in:
parent
e9ad4f04a5
commit
5f9fffae93
1 changed files with 7 additions and 3 deletions
|
|
@ -76,6 +76,8 @@ function Orders() {
|
|||
const [totalOrdersCount, setTotalOrdersCount] = useState<number | undefined>(undefined);
|
||||
const [orderPageLoading, setOrderPageLoading] = useState(false);
|
||||
|
||||
const isFinishedCategory = categoryState.code === 'history';
|
||||
|
||||
function deriveGetUserOrdersFiltersFromState() {
|
||||
const status =
|
||||
categoryState.code === 'active-orders'
|
||||
|
|
@ -436,9 +438,11 @@ function Orders() {
|
|||
<DateRangeSelector value={dateRange} setValue={setDateRange} />
|
||||
</div>
|
||||
|
||||
<Button transparent onClick={cancelAllOrders}>
|
||||
Cancel all orders
|
||||
</Button>
|
||||
{!isFinishedCategory && (
|
||||
<Button transparent onClick={cancelAllOrders}>
|
||||
Cancel all orders
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue