Skip to content

Commit

Permalink
Add table header buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
kattylucy committed Oct 22, 2024
1 parent 76a72ec commit ec01493
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions centrifuge-app/src/pages/Pool/Assets/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CurrencyBalance, Loan } from '@centrifuge/centrifuge-js'
import { Box, IconChevronRight, IconPlus, Shelf, Text } from '@centrifuge/fabric'
import { Box, Button, IconChevronRight, IconDownload, IconPlus, Shelf, Text } from '@centrifuge/fabric'
import * as React from 'react'
import { useParams } from 'react-router'
import { useNavigate, useParams } from 'react-router'
import styled from 'styled-components'
import { RouterTextLink } from '../../../../src/components/TextLink'
import { useBasePath } from '../../../../src/utils/useBasePath'
Expand Down Expand Up @@ -37,6 +37,7 @@ export function PoolDetailAssetsTab() {

export function PoolDetailAssets() {
const { pid: poolId } = useParams<{ pid: string }>()
const navigate = useNavigate()

if (!poolId) throw new Error('Pool not found')

Expand Down Expand Up @@ -122,6 +123,29 @@ export function PoolDetailAssets() {
<PageSummary data={pageSummaryData}>
<CreateAssetButton poolId={poolId} />
</PageSummary>
<Box
paddingX={1}
paddingLeft={3}
paddingRight={3}
display="flex"
justifyContent="space-between"
alignItems="center"
>
<Text variant="heading4">Assets</Text>
<Box display="flex">
<Button
variant="inverted"
style={{ marginRight: 12 }}
small
onClick={() => navigate(`${basePath}/${poolId}/data/asset-tx`)}
>
View asset transactions
</Button>
<Button variant="inverted" icon={<IconDownload size={20} />} small>
Download
</Button>
</Box>
</Box>
<Box padding={3}>
<LoanList loans={nonCashLoans} />
</Box>
Expand Down

0 comments on commit ec01493

Please sign in to comment.