From 96d7e8a68154393d70bcf6452cc0ed026da966eb Mon Sep 17 00:00:00 2001 From: katty barroso Date: Tue, 14 Jan 2025 16:22:29 +0100 Subject: [PATCH] Add view all bn --- .../src/components/Portfolio/Transactions.tsx | 71 +++++++------------ centrifuge-app/src/pages/Prime/Detail.tsx | 3 +- 2 files changed, 26 insertions(+), 48 deletions(-) diff --git a/centrifuge-app/src/components/Portfolio/Transactions.tsx b/centrifuge-app/src/components/Portfolio/Transactions.tsx index ac5a79482..0a4f2abc7 100644 --- a/centrifuge-app/src/components/Portfolio/Transactions.tsx +++ b/centrifuge-app/src/components/Portfolio/Transactions.tsx @@ -1,17 +1,6 @@ import { AssetTransactionType, InvestorTransactionType, Pool, Token, TokenBalance } from '@centrifuge/centrifuge-js' import { Network, formatBalance, useGetExplorerUrl } from '@centrifuge/centrifuge-react' -import { - AnchorButton, - Box, - Button, - IconExternalLink, - Pagination, - PaginationProvider, - Shelf, - Stack, - Text, - usePagination, -} from '@centrifuge/fabric' +import { AnchorButton, Box, Button, IconExternalLink, Shelf, Stack, Text } from '@centrifuge/fabric' import * as React from 'react' import { useNavigate } from 'react-router' import { TransactionTypeChip } from '../../components/Portfolio/TransactionTypeChip' @@ -26,6 +15,7 @@ type TransactionsProps = { txTypes?: InvestorTransactionType[] address?: string trancheId?: string + title?: string } type Row = { @@ -41,9 +31,11 @@ type Row = { network: Network } -export function Transactions({ onlyMostRecent, narrow, txTypes, address, trancheId }: TransactionsProps) { +export function Transactions({ onlyMostRecent, narrow, txTypes, address, trancheId, title }: TransactionsProps) { const navigate = useNavigate() const explorer = useGetExplorerUrl() + const [expandTable, setExpandTable] = React.useState(false) + const columns = [ { align: 'left', @@ -170,41 +162,28 @@ export function Transactions({ onlyMostRecent, narrow, txTypes, address, tranche const csvUrl = React.useMemo(() => csvData && getCSVDownloadUrl(csvData), [csvData]) - const pagination = usePagination({ data: investorTransactions, pageSize: onlyMostRecent ? 3 : 15 }) - return address && investorTransactions?.length ? ( - - - - - - {onlyMostRecent ? ( - - ) : ( - - {pagination.pageCount > 1 && ( - - - - )} - {csvUrl && ( - - - Export as CSV - - - )} - + + + {title} + {csvUrl && ( + + + Download + + )} - - + + + + + + {investorTransactions.length > 3 && !expandTable && ( + + )} + ) : ( diff --git a/centrifuge-app/src/pages/Prime/Detail.tsx b/centrifuge-app/src/pages/Prime/Detail.tsx index 0b4dfa9c0..1874daced 100644 --- a/centrifuge-app/src/pages/Prime/Detail.tsx +++ b/centrifuge-app/src/pages/Prime/Detail.tsx @@ -85,8 +85,7 @@ const PrimeDetail = () => { - Transaction history - + Resolutions