1
1
import Crew1stCrownIcon from "@assets/icons/crew-1st-crown.svg?react"
2
2
3
3
const RankPillar = ( { rank, name, score, height } : any ) => {
4
- const rankStyleMap : { gap : string ; bgColor : string ; fontSize : string } [ ] = [
4
+ const rankStyleMap : { gap : number | string ; bgColor : string ; fontSize : string ; fontWeight : string } [ ] = [
5
5
{
6
- gap : "6" ,
6
+ gap : 24 ,
7
7
bgColor : "#8BBAFE" ,
8
8
fontSize : "32px" ,
9
+ fontWeight : "600" ,
9
10
} ,
10
11
{
11
- gap : "6" ,
12
+ gap : 24 ,
12
13
bgColor : "#DCEBFD" ,
13
14
fontSize : "22px" ,
15
+ fontWeight : "500" ,
14
16
} ,
15
17
{
16
- gap : "4" ,
18
+ gap : 16 ,
17
19
bgColor : "#DCEBFD" ,
18
20
fontSize : "22px" ,
21
+ fontWeight : "500" ,
19
22
} ,
20
23
]
21
24
22
25
const style = rankStyleMap [ rank - 1 ]
23
26
24
27
return (
25
- < div className = "flex flex-col items-center text-zinc-800" style = { { height } } >
28
+ < div className = "flex flex-col items-center text-zinc-800" >
26
29
< div
27
- className = { `flex w-[180px] flex-grow flex- col items-center justify-end py-6 gap- ${ style . gap } rounded-[12px]` }
30
+ className = { `flex w-[180px] flex-col items-center rounded-[12px] py-6 ` }
28
31
style = { {
29
- minHeight : "100px" ,
30
32
backgroundColor : style . bgColor ,
33
+ gap : style . gap ,
34
+ height,
31
35
} }
32
36
>
33
- < div className = "flex flex-col items-center" >
34
- { rank === 1 && < Crew1stCrownIcon className = "mb-2 h-6 w-6" /> }
35
- < div className = { `font-medium text-[${ rankStyleMap [ rank - 1 ] . fontSize } ]` } > { rank } 등</ div >
37
+ < div className = "flex flex-col items-center gap-2" >
38
+ { rank === 1 && (
39
+ < div className = "" >
40
+ < Crew1stCrownIcon className = "h-6 w-6" />
41
+ </ div >
42
+ ) }
43
+ < div
44
+ className = { `font-medium` }
45
+ style = { {
46
+ fontSize : style . fontSize ,
47
+ fontWeight : style . fontWeight ,
48
+ } }
49
+ >
50
+ { rank } 등
51
+ </ div >
36
52
</ div >
37
- < div className = "text-xl font-semibold" > { name } </ div >
38
- < div className = "text-[15px] font-normal " > 틀어짐 { score } 회</ div >
53
+ < div className = "text-[20px] font-semibold" > { name } </ div >
54
+ < div className = "text-[15px] font-normal " > 자세 경고 { score } 회</ div >
39
55
</ div >
40
56
</ div >
41
57
)
@@ -60,9 +76,9 @@ const CrewRanking = ({ rankings, myRank }: { rankings: any[]; myRank: any }) =>
60
76
< div className = "flex h-full gap-12" >
61
77
{ /* 1, 2, 3등 랭킹 */ }
62
78
< div className = "flex h-full flex-1 items-end gap-3" >
63
- < RankPillar rank = { 1 } name = { topThree [ 0 ] . name } score = { topThree [ 0 ] . score } height = "100% " />
64
- < RankPillar rank = { 2 } name = { topThree [ 1 ] . name } score = { topThree [ 1 ] . score } height = "82% " />
65
- < RankPillar rank = { 3 } name = { topThree [ 2 ] . name } score = { topThree [ 2 ] . score } height = "72% " />
79
+ < RankPillar rank = { 1 } name = { topThree [ 0 ] . name } score = { topThree [ 0 ] . score } height = "220px " />
80
+ < RankPillar rank = { 2 } name = { topThree [ 1 ] . name } score = { topThree [ 1 ] . score } height = "180px " />
81
+ < RankPillar rank = { 3 } name = { topThree [ 2 ] . name } score = { topThree [ 2 ] . score } height = "158px " />
66
82
</ div >
67
83
68
84
{ /* 전체 랭킹 목록 */ }
0 commit comments