Skip to content

Commit

Permalink
add timestamp tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
JP Angelle committed Sep 11, 2023
1 parent 79e05c0 commit ddba3e0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
6 changes: 0 additions & 6 deletions centrifuge-app/src/pages/Loan/ExternalFinanceForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,6 @@ export function ExternalFinanceForm({ loan }: { loan: LoanType }) {
: `0.00 ${pool.currency.symbol}`}
</Text>
</Shelf>
<Text variant="body3" color="textSecondary">
This is calculated through the amount multiplied by the current price of the asset
</Text>
</Stack>
{(poolReserve.lessThan(availableFinancing) ||
('valuationMethod' in loan.pricing && !loan.pricing.maxBorrowAmount)) && (
Expand Down Expand Up @@ -277,9 +274,6 @@ export function ExternalFinanceForm({ loan }: { loan: LoanType }) {
: `0.00 ${pool.currency.symbol}`}
</Text>
</Shelf>
<Text variant="body3" color="textSecondary">
This is calculated through the amount multiplied by the current price of the asset
</Text>
</Stack>
{balance.lessThan(debt) && (
<InlineFeedback>
Expand Down
14 changes: 11 additions & 3 deletions centrifuge-app/src/pages/Loan/TransactionTable.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BorrowerTransaction, CurrencyBalance } from '@centrifuge/centrifuge-js'
import { BorrowerTransactionType } from '@centrifuge/centrifuge-js/dist/types/subquery'
import { StatusChip } from '@centrifuge/fabric'
import { StatusChip, Tooltip } from '@centrifuge/fabric'
import { useMemo } from 'react'
import { DataTable } from '../../components/DataTable'
import { formatDate } from '../../utils/date'
Expand Down Expand Up @@ -75,7 +75,14 @@ export const TransactionTable = ({ transactions, currency, loanType }: Props) =>
{
align: 'left',
header: 'Transaction date',
cell: (row) => formatDate(row.transactionDate),
cell: (row) => (
<Tooltip
title="Transaction date"
body={formatDate(row.transactionDate, { hour: 'numeric', minute: 'numeric', second: 'numeric' })}
>
{formatDate(row.transactionDate)}
</Tooltip>
),
flex: '3',
},

Expand Down Expand Up @@ -116,7 +123,8 @@ export const TransactionTable = ({ transactions, currency, loanType }: Props) =>
{
align: 'left',
header: 'Position',
cell: (row) => formatBalance(new CurrencyBalance(row.position, 24), currency, 6, 2),
cell: (row) =>
row.position.isZero() ? '-' : formatBalance(new CurrencyBalance(row.position, 24), currency, 6, 2),
flex: '3',
},
// TODO: add link to transaction
Expand Down

0 comments on commit ddba3e0

Please sign in to comment.