File tree 1 file changed +31
-0
lines changed
packages/grant-explorer/src/features/round/ViewCartPage
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1
1
import { BigNumber , ethers } from "ethers" ;
2
2
import React from "react" ;
3
3
import { PayoutToken } from "../../api/types" ;
4
+
5
+ function useMatchingEstimation ( ) : {
6
+ totalMatchingEstimation : bigint ;
7
+ } {
8
+ return {
9
+ totalMatchingEstimation : 0n ,
10
+ } ;
11
+ }
12
+
4
13
type SummaryBoxProps = {
5
14
payoutTokenPrice : number | undefined ;
6
15
totalDonation : BigNumber ;
7
16
selectedPayoutToken : PayoutToken ;
8
17
} ;
18
+
9
19
export function Summary ( {
10
20
payoutTokenPrice,
11
21
totalDonation,
@@ -20,6 +30,27 @@ export function Summary({
20
30
return (
21
31
< div className = "shrink mb-5 block px-[16px] py-4 rounded-lg shadow-lg bg-white border border-violet-400 font-semibold" >
22
32
< h2 className = "text-xl border-b-2 pb-2" > Summary</ h2 >
33
+ < div className = "flex justify-between mt-4" >
34
+ < p > Estimated matching</ p >
35
+ < p >
36
+ < span data-testid = { "totalDonation" } className = "mr-2" >
37
+ { ethers . utils . formatUnits (
38
+ totalDonation ,
39
+ selectedPayoutToken . decimal
40
+ ) }
41
+ </ span >
42
+ < span data-testid = { "summaryPayoutToken" } >
43
+ { selectedPayoutToken . name }
44
+ </ span >
45
+ </ p >
46
+ </ div >
47
+ { payoutTokenPrice && (
48
+ < div className = "flex flex-row-reverse mt-2" >
49
+ < p className = "text-[14px] text-grey-400" >
50
+ $ { totalDonationInUSD ?. toFixed ( 2 ) }
51
+ </ p >
52
+ </ div >
53
+ ) }
23
54
< div className = "flex justify-between mt-4" >
24
55
< p > Your Contribution</ p >
25
56
< p >
You can’t perform that action at this time.
0 commit comments