Skip to content

Commit

Permalink
fix: add all reference codes to dashboard (#937)
Browse files Browse the repository at this point in the history
* fix: add reference codes to copy and download actions

* fix: remove unnecessary filters
  • Loading branch information
jfrader committed Jun 20, 2023
1 parent a7f5c6a commit 357b490
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
1 change: 0 additions & 1 deletion src/graphql/queries/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ export const QUERY_PROJECT_DASHBOARD_FUNDERS = gql`
}
fundingTxs {
email
paidAt
amount
uuid
}
Expand Down
21 changes: 10 additions & 11 deletions src/pages/projectDashboard/sections/ProjectContributors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,14 @@ export const ProjectContributors = () => {
render({ fundingTxs }: Funder) {
return (
<VStack alignItems="start">
{fundingTxs
.filter((tx) => Boolean(tx.paidAt))
.map((tx) => (
<Tooltip
key={tx.uuid}
label={<SatoshiAmount>{tx.amount}</SatoshiAmount>}
>
<Text variant="caption">{tx.uuid}</Text>
</Tooltip>
))}
{fundingTxs.map((tx) => (
<Tooltip
key={tx.uuid}
label={<SatoshiAmount>{tx.amount}</SatoshiAmount>}
>
<Text variant="caption">{tx.uuid}</Text>
</Tooltip>
))}
</VStack>
)
},
Expand Down Expand Up @@ -227,7 +225,8 @@ export const ProjectContributors = () => {
funder.amountFunded || '-',
rewardValue || '-',
dateString || '-',
funder.fundingTxs?.find((val) => val.email)?.email || '-',
funder.fundingTxs.find((val) => val.email)?.email || '-',
funder.fundingTxs.reduce((acc, tx) => `${acc} ${tx.uuid}`, ''),
]
csvData.push(funderData)
}
Expand Down
4 changes: 2 additions & 2 deletions src/types/generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5323,7 +5323,7 @@ export type ProjectDashboardFundersQuery = {
fundingTxs: Array<{
__typename?: 'FundingTx'
email?: string | null
paidAt?: any | null
amount: number
uuid?: string | null
}>
rewards: Array<{
Expand Down Expand Up @@ -9002,7 +9002,7 @@ export const ProjectDashboardFundersDocument = gql`
}
fundingTxs {
email
paidAt
amount
uuid
}
rewards {
Expand Down

0 comments on commit 357b490

Please sign in to comment.