11import { TournamentTrophyIcon } from "@/app/components/icons/Icons" ;
22import { getOrdinalSuffix } from "@/app/lib/utils" ;
3- import Lords from "public/icons/lords.svg" ;
4- import { useEffect , useState } from "react" ;
53
64interface Prizes {
75 prizes : any ;
@@ -10,16 +8,16 @@ interface Prizes {
108
119const Prizes = ( { prizes, lordsDollarValue } : Prizes ) => {
1210 const formattedPrizes = prizes . lsTournamentsV0TournamentPrizeModels . edges ;
13- const [ lordsDollar , setLordsDollar ] = useState < bigint > ( 0n ) ;
11+ // const [lordsDollar, setLordsDollar] = useState<bigint>(0n);
1412
15- const handleLordsDollarValue = async ( ) => {
16- const value = await lordsDollarValue ( ) ;
17- setLordsDollar ( value ) ;
18- } ;
13+ // const handleLordsDollarValue = async () => {
14+ // const value = await lordsDollarValue();
15+ // setLordsDollar(value);
16+ // };
1917
20- useEffect ( ( ) => {
21- handleLordsDollarValue ( ) ;
22- } , [ ] ) ;
18+ // useEffect(() => {
19+ // handleLordsDollarValue();
20+ // }, []);
2321
2422 return (
2523 < >
@@ -41,7 +39,7 @@ const Prizes = ({ prizes, lordsDollarValue }: Prizes) => {
4139 return (
4240 < div
4341 key = { index }
44- className = "flex flex-row gap-5 overflow-scroll default-scroll "
42+ className = "flex flex-row gap-5 overflow-scroll item-scrol h-10 "
4543 >
4644 { prizes . map ( ( prize : any , index : any ) => {
4745 const isERC20 = variant === "erc20" ;
@@ -52,39 +50,42 @@ const Prizes = ({ prizes, lordsDollarValue }: Prizes) => {
5250 ) ;
5351
5452 return (
55- < span key = { index } className = "flex flex-row items-center gap-2" >
56- < div className = "flex flex-row gap-2 items-center" >
57- { prize . payout_position <= 3 && (
58- < span
59- className = { `w-4 h-4 sm:w-8 sm:h-8 ${
60- prize . payout_position === 1
61- ? "text-terminal-gold"
62- : prize . payout_position === 2
63- ? "text-terminal-silver"
64- : "text-terminal-bronze"
65- } `}
66- >
67- < TournamentTrophyIcon />
68- </ span >
69- ) }
70- < p className = "flex text-2xl" >
71- { prize . payout_position }
72- < sup className = "text-sm" >
73- { getOrdinalSuffix ( prize . payout_position ) . slice ( 1 ) }
74- </ sup >
75- </ p >
76- </ div >
77- < span className = "hidden sm:flex text-2xl" > -</ span >
78- < Lords className = "self-center w-4 h-4 sm:w-5 sm:h-5 fill-current" />
79- < span className = "text-terminal-green text-2xl" >
80- $
81- { (
82- ( tokenValue * Number ( lordsDollar ) ) /
83- 10 ** 8 /
84- 10 ** 18
85- ) . toFixed ( 2 ) }
53+ < >
54+ { index > 0 && (
55+ < div className = "h-1/2 min-w-[2px] bg-terminal-green self-center opacity-50" />
56+ ) }
57+ < span
58+ key = { index }
59+ className = "flex flex-row items-center gap-2"
60+ >
61+ < div className = "flex flex-row gap-2 items-center" >
62+ { prize . payout_position <= 3 && (
63+ < span
64+ className = { `w-4 h-4 sm:w-8 sm:h-8 ${
65+ prize . payout_position === 1
66+ ? "text-terminal-gold"
67+ : prize . payout_position === 2
68+ ? "text-terminal-silver"
69+ : "text-terminal-bronze"
70+ } `}
71+ >
72+ < TournamentTrophyIcon />
73+ </ span >
74+ ) }
75+ < p className = "flex text-2xl" >
76+ { prize . payout_position }
77+ < sup className = "text-sm" >
78+ { getOrdinalSuffix ( prize . payout_position ) . slice ( 1 ) }
79+ </ sup >
80+ </ p >
81+ </ div >
82+ < span className = "hidden sm:flex text-2xl" > -</ span >
83+ { /* <Lords className="self-center w-4 h-4 sm:w-5 sm:h-5 fill-current" /> */ }
84+ < span className = "text-terminal-green text-2xl" >
85+ ${ tokenValue / 10 ** 18 }
86+ </ span >
8687 </ span >
87- </ span >
88+ </ >
8889 ) ;
8990 } ) }
9091 </ div >
0 commit comments