@@ -7,6 +7,7 @@ import BalanceChart from "./BalanceChart";
77import { BalanceStats } from "./BalanceStats" ;
88import { BalanceWarningMessage } from "./BalanceWarningMessage" ;
99import classNames from "classnames" ;
10+ import { GoalProgress } from "./GoalProgress" ;
1011
1112export const DonateTab = ( {
1213 handlePageChange
@@ -20,7 +21,7 @@ export const DonateTab = ({
2021 : `https://account.venmo.com/pay?recipients=${ venmoUsername } ` ;
2122
2223 const [ isLoading , setIsLoading ] = React . useState ( true ) ;
23- const [ activeTab , setActiveTab ] = React . useState ( "balance-stats " ) ;
24+ const [ activeTab , setActiveTab ] = React . useState ( "fundraising-progress " ) ;
2425 const [ transactions , setTransactions ] = React . useState < TransactionRecord [ ] > ( [ ] ) ;
2526
2627 const totalCost = useMemo ( ( ) => {
@@ -60,9 +61,11 @@ export const DonateTab = ({
6061 </ h2 >
6162 < BalanceWarningMessage totalCost = { totalCost } totalDonations = { totalDonations } handlePageChange = { handlePageChange } />
6263
63- < h2 className = "ui center aligned text container" >
64- Reservation costs < strong > $37.50</ strong > per day — help keep the games going by donating today.
65- </ h2 >
64+ < div className = "ui center aligned text container" >
65+ < h3 className = "ui header" >
66+ Reservation costs < strong > $37.50</ strong > per day — help keep the games going by donating today. < br />
67+ </ h3 >
68+ </ div >
6669
6770 < div className = { classnames ( "ui center aligned very basic segment" ) } >
6871 < a href = { link } className = "ui primary button" >
@@ -71,15 +74,22 @@ export const DonateTab = ({
7174 </ div >
7275
7376 < div className = "ui top attached tabular menu" >
77+ < div style = { { cursor : "pointer" } } onClick = { ( ) => { setActiveTab ( "fundraising-progress" ) } } className = { classNames ( { active : activeTab == "fundraising-progress" } , "item" ) } > < i className = "thermometer half icon" /> </ div >
7478 < div style = { { cursor : "pointer" } } onClick = { ( ) => { setActiveTab ( "balance-stats" ) } } className = { classNames ( { active : activeTab == "balance-stats" } , "item" ) } > < i className = "hashtag icon" /> </ div >
7579 < div style = { { cursor : "pointer" } } onClick = { ( ) => { setActiveTab ( "balance-graph" ) } } className = { classNames ( { active : activeTab == "balance-graph" } , "item" ) } > < i className = "chart line icon" /> </ div >
7680 < div style = { { cursor : "pointer" } } onClick = { ( ) => { setActiveTab ( "permits-donations" ) } } className = { classNames ( { active : activeTab == "permits-donations" } , "item" ) } > < i className = "file alternate icon" > </ i > </ div >
7781 </ div >
7882 < div className = { classnames ( "ui bottom attached active tab" , { loading : isLoading } , "segment" ) } >
83+ { activeTab === "fundraising-progress" && (
84+ < div className = "ui center aligned very basic segment" >
85+ < h2 > Fundraising Progress</ h2 >
86+ { isLoading ? < div className = "ui active inline loader" > </ div > : < GoalProgress totalDonations = { totalDonations } /> }
87+ </ div >
88+ ) }
7989 { activeTab === "balance-stats" && (
8090 < div className = "ui center aligned very basic segment" >
81- < h2 > Balance stats </ h2 >
82- < BalanceStats isLoading = { isLoading } totalCost = { totalCost } totalDonations = { totalDonations } />
91+ < h2 > Balance Stats </ h2 >
92+ { isLoading ? < div className = "ui active inline loader" > </ div > : < BalanceStats isLoading = { isLoading } totalCost = { totalCost } totalDonations = { totalDonations } /> }
8393 </ div >
8494 ) }
8595 { activeTab === "balance-graph" && (
0 commit comments