Skip to content

Commit

Permalink
fix: missing pooladdress for navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
L03TJ3 committed Dec 6, 2024
1 parent 068d600 commit 5304249
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions packages/app/src/components/ViewCollective.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ import { StopDonationActionButton } from './StopDonationActionButton';
const HasDonatedCard = ({
donorCollective,
tokenPrice,
poolAddress,
}: {
donorCollective?: DonorCollective;
tokenPrice?: number;
poolAddress?: string;
}) => {
const { address } = useAccount();
const { data: ensName } = useEnsName({ address, chainId: 1 });
Expand Down Expand Up @@ -151,7 +153,7 @@ const HasDonatedCard = ({
color={Colors.green[200]}
seeType={false}
onPress={() => {
navigate(`/donate/${donorCollective?.collective}`);
navigate(`/donate/${poolAddress}`);
}}
/>
</View>
Expand All @@ -165,7 +167,7 @@ const HasDonatedCard = ({
color={Colors.purple[200]}
seeType={true}
onPress={() => {
navigate(`/collective/${donorCollective?.collective}/donors`);
navigate(`/collective/${poolAddress}/donors`);
}}
/>
</View>
Expand Down Expand Up @@ -307,7 +309,11 @@ function ViewCollective({ collective }: ViewCollectiveProps) {
/>
</View>
</View>
<HasDonatedCard donorCollective={maybeDonorCollective} tokenPrice={tokenPrice} />
<HasDonatedCard
donorCollective={maybeDonorCollective}
tokenPrice={tokenPrice}
poolAddress={collective.address}
/>
</View>

<View style={styles.collectiveDesktopActions}>
Expand Down Expand Up @@ -394,7 +400,11 @@ function ViewCollective({ collective }: ViewCollectiveProps) {
currency={collective.rewardToken}
/>
</View>
<HasDonatedCard donorCollective={maybeDonorCollective} tokenPrice={tokenPrice} />
<HasDonatedCard
donorCollective={maybeDonorCollective}
tokenPrice={tokenPrice}
poolAddress={collective.address}
/>
</View>

<View style={[styles.container]}>
Expand Down

0 comments on commit 5304249

Please sign in to comment.