Updated sorting dropdown to accept an order object instead of two individual props

This commit is contained in:
Alejandro Celaya
2021-11-06 12:26:20 +01:00
parent 7169c6e083
commit ee826458be
7 changed files with 41 additions and 64 deletions

View File

@@ -67,12 +67,7 @@ const ShortUrlsList = (ShortUrlsTable: FC<ShortUrlsTableProps>) => boundToMercur
return (
<>
<div className="d-block d-lg-none mb-3">
<SortingDropdown
items={SORTABLE_FIELDS}
orderField={order.field}
orderDir={order.dir}
onChange={handleOrderBy}
/>
<SortingDropdown items={SORTABLE_FIELDS} order={order} onChange={handleOrderBy} />
</div>
<Card body className="pb-1">
<ShortUrlsTable