Skip to content

Commit

Permalink
fix: remove unnecessary filters
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrader committed Jun 8, 2023
1 parent 1eb8511 commit fc7f404
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 22 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
24 changes: 10 additions & 14 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,10 +225,8 @@ export const ProjectContributors = () => {
funder.amountFunded || '-',
rewardValue || '-',
dateString || '-',
funder.fundingTxs?.find((val) => val.email)?.email || '-',
funder.fundingTxs
.filter((tx) => Boolean(tx.paidAt))
.reduce((acc, tx) => `${acc} ${tx.uuid}`, ''),
funder.fundingTxs.find((val) => val.email)?.email || '-',
funder.fundingTxs.reduce((acc, tx) => `${acc} ${tx.uuid}`, ''),
]
csvData.push(funderData)
}
Expand Down
14 changes: 7 additions & 7 deletions src/types/generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,6 @@ export type Entry = {
image?: Maybe<Scalars['String']>
/** Project within which the Entry was created. */
project?: Maybe<Project>
/** @deprecated This field was replaced by the status field and will eventually be removed. */
published: Scalars['Boolean']
publishedAt?: Maybe<Scalars['String']>
status: EntryStatus
/** Title of the Entry. */
Expand Down Expand Up @@ -467,7 +465,8 @@ export type FundingTx = {
source: Scalars['String']
sourceResource?: Maybe<SourceResource>
status: FundingStatus
uuid: Scalars['String']
/** Private reference code viewable only by the Funder and the ProjectOwner related to this FundingTx */
uuid?: Maybe<Scalars['String']>
}

export type FundingTxConfirmedSubscriptionResponse = {
Expand Down Expand Up @@ -2404,7 +2403,6 @@ export type EntryResolvers<
id?: Resolver<ResolversTypes['BigInt'], ParentType, ContextType>
image?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>
project?: Resolver<Maybe<ResolversTypes['Project']>, ParentType, ContextType>
published?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>
publishedAt?: Resolver<
Maybe<ResolversTypes['String']>,
ParentType,
Expand Down Expand Up @@ -2578,7 +2576,7 @@ export type FundingTxResolvers<
ContextType
>
status?: Resolver<ResolversTypes['FundingStatus'], ParentType, ContextType>
uuid?: Resolver<ResolversTypes['String'], ParentType, ContextType>
uuid?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>
}

Expand Down Expand Up @@ -4102,7 +4100,7 @@ export type FundingTxWithInvoiceStatusFragment = {
export type FundingTxFragment = {
__typename?: 'FundingTx'
id: any
uuid: string
uuid?: string | null
invoiceId: string
paymentRequest?: string | null
amount: number
Expand Down Expand Up @@ -5311,7 +5309,8 @@ export type ProjectDashboardFundersQuery = {
fundingTxs: Array<{
__typename?: 'FundingTx'
email?: string | null
uuid: string
amount: number
uuid?: string | null
}>
rewards: Array<{
__typename?: 'FunderReward'
Expand Down Expand Up @@ -8937,6 +8936,7 @@ export const ProjectDashboardFundersDocument = gql`
}
fundingTxs {
email
amount
uuid
}
rewards {
Expand Down

0 comments on commit fc7f404

Please sign in to comment.