fix(profile): 프로필 후원 랭킹 왕관 UI를 홈과 동일하게 조정한다

This commit is contained in:
Yu Sung
2026-03-17 15:57:59 +09:00
parent 99fcf3a94c
commit 5e0f6fd3e3
2 changed files with 27 additions and 24 deletions

View File

@@ -12,13 +12,7 @@ struct UserProfileDonationView: View {
let userId: Int
let donationRankingResponse: [UserDonationRankingResponse]
let rankingCrawns = ["ic_crown_1", "ic_crown_2", "ic_crown_3"]
let rankingColors = [
[Color(hex: "ffdc00"), Color(hex: "ffb600")],
[Color(hex: "ffffff"), Color(hex: "9f9f9f")],
[Color(hex: "e6a77a"), Color(hex: "c67e4a")],
[Color(hex: "ffffff").opacity(0), Color(hex: "ffffff").opacity(0)]
]
let crowns = ["img_rank_1", "img_rank_2", "img_rank_3"]
var body: some View {
VStack(alignment: .leading, spacing: 14) {
@@ -43,7 +37,7 @@ struct UserProfileDonationView: View {
ForEach(0..<donationRankingResponse.count, id: \.self) { index in
let item = donationRankingResponse[index]
VStack(spacing: 6.7) {
ZStack {
ZStack(alignment: .center) {
KFImage(URL(string: item.profileImage))
.cancelOnDisappear(true)
.downsampling(
@@ -56,26 +50,14 @@ struct UserProfileDonationView: View {
.scaledToFill()
.frame(width: 70, height: 70, alignment: .top)
.clipShape(Circle())
.overlay(
Circle()
.stroke(
AngularGradient(colors: rankingColors[index < 4 ? index : 3], center: .center),
lineWidth: 3
)
)
if index < 3 {
VStack(alignment: .trailing, spacing: 0) {
Spacer()
Image(rankingCrawns[index])
.resizable()
.frame(width: 25, height: 25)
}
.frame(width: 73, height: 73, alignment: .trailing)
Image(crowns[index])
.resizable()
.frame(width: 90, height: 87.5)
}
}
.frame(width: 73, height: 73)
.frame(width: 90, height: 87.5)
Text(item.nickname)
.appFont(size: 12, weight: .medium)