Skip to content

Commit

Permalink
Fix array to view all
Browse files Browse the repository at this point in the history
  • Loading branch information
kattylucy committed Jan 20, 2025
1 parent 96d7e8a commit c135d8a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions centrifuge-app/src/components/Portfolio/Transactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,12 @@ export function Transactions({ onlyMostRecent, narrow, txTypes, address, tranche
)}
</Box>
<Box overflow="auto" width="100%">
<DataTable data={expandTable ? investorTransactions : investorTransactions.splice(0, 3)} columns={columns} />
<DataTable data={expandTable ? investorTransactions : investorTransactions.slice(0, 3)} columns={columns} />
</Box>

{investorTransactions.length > 3 && !expandTable && (
<Button onClick={() => setExpandTable(true)} variant="inverted" style={{ width: 100 }} small>
View all
{investorTransactions.length > 3 && (
<Button onClick={() => setExpandTable(!expandTable)} variant="inverted" style={{ width: 120 }} small>
{expandTable ? 'Show less' : 'View all'}
</Button>
)}
</Stack>
Expand Down

0 comments on commit c135d8a

Please sign in to comment.