홈 - 크리에이터 랭킹 뱃지 변경

This commit is contained in:
Yu Sung
2026-01-19 20:07:23 +09:00
parent 4d893a2081
commit 68dab028cc
13 changed files with 102 additions and 75 deletions

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "img_rank_1.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "img_rank_2.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "img_rank_3.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -1,12 +0,0 @@
{
"images" : [
{
"filename" : "rank_1.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@@ -1,12 +0,0 @@
{
"images" : [
{
"filename" : "rank_2.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@@ -1,12 +0,0 @@
{
"images" : [
{
"filename" : "rank_3.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@@ -15,19 +15,27 @@ struct HomeCreatorRankingItemView: View {
let onClickFollow: (Int, Bool) -> Void let onClickFollow: (Int, Bool) -> Void
let crowns = ["rank_1", "rank_2", "rank_3"] let crowns = ["img_rank_1", "img_rank_2", "img_rank_3"]
@AppStorage("token") private var token: String = UserDefaults.string(forKey: UserDefaultsKey.token) @AppStorage("token") private var token: String = UserDefaults.string(forKey: UserDefaultsKey.token)
var body: some View { var body: some View {
ZStack(alignment: .topLeading) {
VStack(spacing: 0) { VStack(spacing: 0) {
ZStack(alignment: .center) {
DownsampledKFImage( DownsampledKFImage(
url: URL(string: item.profileImageUrl), url: URL(string: item.profileImageUrl),
size: CGSize(width: 84, height: 84) size: CGSize(width: 84, height: 84)
) )
.clipShape(Circle()) .clipShape(Circle())
if rank <= 3 {
Image(crowns[rank - 1])
.resizable()
.frame(width: 108, height: 105)
}
}
.frame(width: 108, height: 105)
Text(item.nickname) Text(item.nickname)
.font(.custom(Font.preRegular.rawValue, size: 16)) .font(.custom(Font.preRegular.rawValue, size: 16))
.foregroundColor(.white) .foregroundColor(.white)
@@ -61,14 +69,6 @@ struct HomeCreatorRankingItemView: View {
.background(Color(hex: "263238")) .background(Color(hex: "263238"))
.cornerRadius(16) .cornerRadius(16)
.padding(.top, 20) .padding(.top, 20)
if rank <= 3 {
Image(crowns[rank - 1])
.resizable()
.frame(width: 40, height: 40)
.padding(.leading, 10)
}
}
} }
} }