Skip to content

Commit

Permalink
added correct Collective metadata to donate page
Browse files Browse the repository at this point in the history
  • Loading branch information
krisbitney committed Dec 23, 2023
1 parent ca5cb86 commit cd0a251
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
18 changes: 9 additions & 9 deletions packages/app/src/components/DonateComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { useGetTokenPrice, useContractCalls } from '../hooks';
import { useAccount } from 'wagmi';

interface DonateComponentProps {
walletConected: boolean;
walletConnected: boolean;
insufficientLiquidity: boolean;
priceImpace: boolean;
priceImpact: boolean;
insufficientBalance: boolean;
currentCollective: {
name: string;
Expand All @@ -40,9 +40,9 @@ const frequencyOptions = [
];

function DonateComponent({
walletConected,
walletConnected,
insufficientLiquidity,
priceImpace,
priceImpact,
insufficientBalance,
currentCollective,
}: DonateComponentProps) {
Expand Down Expand Up @@ -205,7 +205,7 @@ function DonateComponent({
)}
</>

{walletConected && (
{walletConnected && (
<View style={styles.actionBox}>
<View style={styles.reviewContainer}>
<View>
Expand Down Expand Up @@ -314,7 +314,7 @@ function DonateComponent({
</View>
)}

{priceImpace && (
{priceImpact && (
<View style={styles.warningView}>
<Image source={{ uri: InfoIconOrange }} style={styles.infoIcon} />
<View style={styles.actionBox}>
Expand Down Expand Up @@ -356,9 +356,9 @@ function DonateComponent({
<TouchableOpacity>
<RoundedButton
maxWidth={isDesktopResolution ? 343 : undefined}
title={getButtonText(insufficientLiquidity, priceImpace, insufficientBalance)}
backgroundColor={getButtonBGC(insufficientLiquidity, priceImpace, insufficientBalance)}
color={getButtonTextColor(insufficientLiquidity, priceImpace, insufficientBalance)}
title={getButtonText(insufficientLiquidity, priceImpact, insufficientBalance)}
backgroundColor={getButtonBGC(insufficientLiquidity, priceImpact, insufficientBalance)}
color={getButtonTextColor(insufficientLiquidity, priceImpact, insufficientBalance)}
fontSize={18}
seeType={false}
onPress={() => {
Expand Down
11 changes: 7 additions & 4 deletions packages/app/src/pages/DonatePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,27 @@ import DonateComponent from '../components/DonateComponent';
import React from 'react';
import Breadcrumb from '../components/Breadcrumb';
import { useMediaQuery } from 'native-base';
import { useCollectivesMetadataById } from '../hooks';

function DonatePage() {
const collectiveId = window.location.pathname.slice('/donate/'.length);
const [isDesktopResolution] = useMediaQuery({
minWidth: 612,
});

const ipfsCollective = useCollectivesMetadataById([collectiveId])[0];

return (
<Layout>
{isDesktopResolution && <Breadcrumb previousPage={`collective / ${collectiveId}`} currentPage={`donate`} />}
<DonateComponent
walletConected={true}
walletConnected={true}
insufficientLiquidity={false}
priceImpace={false}
priceImpact={false}
insufficientBalance={false}
currentCollective={{
name: 'Restoring the Kakamega Forest',
description: '',
name: ipfsCollective.name,
description: ipfsCollective.description,
}}
/>
</Layout>
Expand Down

0 comments on commit cd0a251

Please sign in to comment.