Skip to content

Commit

Permalink
change transactions column order
Browse files Browse the repository at this point in the history
  • Loading branch information
torztomasz committed Aug 18, 2023
1 parent 2d3241c commit d5fe527
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { TimeAgeCell } from '../TimeAgeCell'
interface TransactionsTableProps {
transactions: TransactionEntry[]
hideAge?: boolean
hideAmount?: boolean
hideInfo?: boolean
}

export interface TransactionEntry {
Expand All @@ -36,8 +36,8 @@ export interface TransactionEntry {
export function TransactionsTable(props: TransactionsTableProps) {
const columns: Column[] = [
{ header: 'Tx Hash' },
...(!props.hideAmount ? [{ header: 'Amount' }] : []),
{ header: 'Type' },
...(!props.hideInfo ? [{ header: 'Info' }] : []),
{ header: 'Status' },
...(!props.hideAge ? [{ header: 'Age' }] : []),
]
Expand All @@ -54,7 +54,8 @@ export function TransactionsTable(props: TransactionsTableProps) {
{transaction.hash.toString()}
</InlineEllipsis>
</Link>,
...(!props.hideAmount
toTypeText(transaction.type),
...(!props.hideInfo
? [
<div className="flex items-center gap-0.5">
{transaction.asset && transaction.amount !== undefined
Expand All @@ -71,7 +72,6 @@ export function TransactionsTable(props: TransactionsTableProps) {
</div>,
]
: []),
toTypeText(transaction.type),
<StatusBadge type={status.type}>{status.text}</StatusBadge>,
...(!props.hideAge
? [<TimeAgeCell timestamp={transaction.timestamp} />]
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/view/pages/home/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function HomePage(props: HomePageProps) {
>
<TransactionsTable
transactions={props.forcedTransactions}
hideAmount
hideInfo
/>
</TablePreview>
</Card>
Expand Down

0 comments on commit d5fe527

Please sign in to comment.