기부 랭킹 기간 선택 추가

프로필 기부 랭킹 조회와 프로필 갱신 요청에\n기간 값을 전달한다.
This commit is contained in:
Yu Sung
2026-02-03 18:38:36 +09:00
parent d686223362
commit 13f8d924c0
9 changed files with 257 additions and 87 deletions

View File

@@ -47,6 +47,36 @@ struct UserProfileDonationAllView: View {
.padding(.top, 13.3)
.padding(.horizontal, 13.3)
HStack(spacing: 73) {
HStack(spacing: 8) {
Image(viewModel.donationRankingPeriod == .weekly ? "btn_square_select_checked" : "btn_square_select_normal")
.resizable()
.frame(width: 20, height: 20)
Text(I18n.DonationRanking.weekly)
.appFont(size: 14, weight: .medium)
.foregroundColor(Color(hex: "eeeeee"))
}
.onTapGesture {
viewModel.selectDonationRankingPeriod(.weekly)
}
HStack(spacing: 8) {
Image(viewModel.donationRankingPeriod == .cumulative ? "btn_square_select_checked" : "btn_square_select_normal")
.resizable()
.frame(width: 20, height: 20)
Text(I18n.DonationRanking.cumulative)
.appFont(size: 14, weight: .medium)
.foregroundColor(Color(hex: "eeeeee"))
}
.onTapGesture {
viewModel.selectDonationRankingPeriod(.cumulative)
}
}
.padding(.top, 13.3)
.padding(.horizontal, 13.3)
VStack(spacing: 13.3) {
HStack(spacing: 0) {
Text("오늘")
@@ -101,6 +131,25 @@ struct UserProfileDonationAllView: View {
.cornerRadius(8)
.padding(.top, 13.3)
.padding(.horizontal, 13.3)
HStack(spacing: 0) {
SeriesDetailTabView(
title: I18n.DonationRanking.weekly,
width: screenSize().width / 2,
isSelected: viewModel.selectedRankingPeriod == .weekly
) {
viewModel.selectViewRankingPeriod(.weekly)
}
SeriesDetailTabView(
title: I18n.DonationRanking.cumulative,
width: screenSize().width / 2,
isSelected: viewModel.selectedRankingPeriod == .cumulative
) {
viewModel.selectViewRankingPeriod(.cumulative)
}
}
.padding(.top, 13.3)
}
HStack(alignment: .center, spacing: 0) {