fix: customer list sorting

This commit is contained in:
Sérgio Salgado 2022-01-12 18:01:47 +00:00
parent e44e5012f1
commit 24bf700eba

View file

@ -80,9 +80,9 @@ const Customers = () => {
const configData = R.path(['config'])(customersResponse) ?? []
const locale = configData && fromNamespace(namespaces.LOCALE, configData)
const customersData = R.sortWith([R.descend(R.prop('lastActive'))])(
filteredCustomers ?? []
)
const customersData = R.sortWith([
R.descend(it => new Date(R.prop('lastActive', it) ?? '0'))
])(filteredCustomers ?? [])
const onFilterChange = filters => {
const filtersObject = getFiltersObj(filters)