fix: soft rework Customers pages

This commit is contained in:
Taranto 2020-08-07 18:56:31 +01:00 committed by Josh Harvey
parent 246f736fa8
commit b853f366f1
27 changed files with 658 additions and 306 deletions

View file

@ -112,9 +112,9 @@ const CustomerProfile = memo(() => {
})
const customerData = R.path(['customer'])(customerResponse) ?? []
const transactionsData = R.sortWith([R.descend('created')])(
R.path(['transactions'])(customerData) ?? []
const rawTransactions = R.path(['transactions'])(customerData) ?? []
const sortedTransactions = R.sort(R.descend(R.prop('cryptoAtoms')))(
rawTransactions
)
const blocked =
@ -133,7 +133,7 @@ const CustomerProfile = memo(() => {
Customers
</Label1>
<Label2 noMargin className={classes.labelLink}>
Rafael{R.path(['name'])(customerData)}
{R.path(['name'])(customerData) ?? R.path(['phone'])(customerData)}
</Label2>
</Breadcrumbs>
<div>
@ -171,7 +171,7 @@ const CustomerProfile = memo(() => {
/>
</Box>
</div>
<TransactionsList data={transactionsData} />
<TransactionsList data={sortedTransactions} />
</>
)
})