import {Button, Checkbox, Group, Table} from "@mantine/core"; import React, {useState} from "react"; import {Order} from "../types"; import moment from "moment"; interface OrderListTableProps { orders: Order[]; onClick?: (order: Order) => void; limit?: number; } const OrderListTable = (props: OrderListTableProps) => { let orders = props.orders; const [showCanceledOrders, setShowCanceledOrders] = useState(false); const [limit, setLimit] = useState(props.limit || 100); if (!showCanceledOrders) { orders = orders.filter((order: Order) => { return order.status != "CANCELED" }) } if (orders.length > limit) { orders = orders.slice(0, limit) } const rows = orders.map((order: Order) => (
Order ID | Symbol | Side | Order Type | Price | Quantity | Status | Creation Time | Tag |
---|