@@ -59,16 +59,20 @@ export default function RoundStats() {
59
59
let totalDirectDonations = 0 ;
60
60
let totalDirectDonationCount = 0 ;
61
61
62
- const directDonations : BaseDonorValues [ ] =
63
- await dataLayer . getDirectDonationsByProjectId ( {
64
- projectId : props . projectID ,
65
- chainIds : allChains . map ( ( chain ) => chain . id ) ,
66
- } ) ;
62
+ try {
63
+ const directDonations : BaseDonorValues [ ] =
64
+ await dataLayer . getDirectDonationsByProjectId ( {
65
+ projectId : props . projectID ,
66
+ chainIds : allChains . map ( ( chain ) => chain . id ) ,
67
+ } ) ;
67
68
68
- directDonations . forEach ( ( donation ) => {
69
- totalDirectDonations += donation . totalAmountDonatedInUsd ;
70
- totalDirectDonationCount += donation . totalDonationsCount ;
71
- } ) ;
69
+ directDonations . forEach ( ( donation ) => {
70
+ totalDirectDonations += donation . totalAmountDonatedInUsd ;
71
+ totalDirectDonationCount += donation . totalDonationsCount ;
72
+ } ) ;
73
+ } catch ( e ) {
74
+ console . error ( "Error fetching direct donations" , e ) ;
75
+ }
72
76
73
77
if ( props . stats ?. length > 0 ) {
74
78
props . stats . forEach ( ( stat ) => {
@@ -117,20 +121,24 @@ export default function RoundStats() {
117
121
container : any ,
118
122
pt : boolean ,
119
123
key : string ,
120
- spaceBetween ?: boolean
124
+ shortRow ?: boolean
121
125
) => (
122
126
< div
123
127
key = { key }
124
128
className = { `grid ${
125
- spaceBetween ? "md:grid-cols-8" : "md:grid-cols-7"
129
+ shortRow ? "md:grid-cols-8" : "md:grid-cols-7"
126
130
} sm:grid-cols-1 border-b border-gitcoin-grey-100 pb-10 ${ pt && "pt-10" } `}
127
131
>
128
- < div className = { `${ spaceBetween ? "md:col-span-2" : "md:col-span-1" } ` } >
132
+ < div
133
+ className = { `${
134
+ shortRow ? "md:col-span-2" : "md:col-span-1"
135
+ } flex items-center justify-start`}
136
+ >
129
137
{ description }
130
138
</ div >
131
139
< div
132
140
className = { `${
133
- spaceBetween ? "md:col-span-5" : "md:col-span-6"
141
+ shortRow ? "md:col-span-5" : "md:col-span-6"
134
142
} sm:col-span-1 md:flex space-between`}
135
143
>
136
144
{ container }
@@ -182,7 +190,7 @@ export default function RoundStats() {
182
190
heading = "Total Direct Donations"
183
191
value = { `$${ allTimeStats . totalDirectDonations . toFixed ( 2 ) } ` }
184
192
bg = "gitcoin-violet-100"
185
- tooltip = "The number of contributions this project has received."
193
+ tooltip = "The amount of contributions this project has received as direct donations ."
186
194
/>
187
195
< StatCard
188
196
heading = "No. of Contributions"
0 commit comments