fix(profile): 채널 후원 비밀 문구를 분리하고 자기 프로필 후원 버튼을 숨긴다

This commit is contained in:
Yu Sung
2026-02-26 00:44:37 +09:00
parent b84b996059
commit db68aa90d2
6 changed files with 165 additions and 18 deletions

View File

@@ -3,8 +3,21 @@ import SwiftUI
struct UserProfileChannelDonationView: View {
let creatorId: Int
let donationItems: [GetChannelDonationListItem]
let isShowDonationButton: Bool
let onTapDonationButton: () -> Void
init(
creatorId: Int,
donationItems: [GetChannelDonationListItem],
isShowDonationButton: Bool = true,
onTapDonationButton: @escaping () -> Void
) {
self.creatorId = creatorId
self.donationItems = donationItems
self.isShowDonationButton = isShowDonationButton
self.onTapDonationButton = onTapDonationButton
}
var body: some View {
VStack(alignment: .leading, spacing: 14) {
HStack(spacing: 0) {
@@ -48,22 +61,24 @@ struct UserProfileChannelDonationView: View {
}
}
HStack(spacing: 6.7) {
Image("ic_donation_white")
.resizable()
.frame(width: 20, height: 20)
if isShowDonationButton {
HStack(spacing: 6.7) {
Image("ic_donation_white")
.resizable()
.frame(width: 20, height: 20)
Text(I18n.MemberChannel.channelDonationButton)
.appFont(size: 16, weight: .bold)
.foregroundColor(.white)
}
.frame(maxWidth: .infinity)
.padding(.vertical, 16)
.background(Color(hex: "525252"))
.cornerRadius(16)
.padding(.horizontal, 24)
.onTapGesture {
onTapDonationButton()
Text(I18n.MemberChannel.channelDonationButton)
.appFont(size: 16, weight: .bold)
.foregroundColor(.white)
}
.frame(maxWidth: .infinity)
.padding(.vertical, 16)
.background(Color(hex: "525252"))
.cornerRadius(16)
.padding(.horizontal, 24)
.onTapGesture {
onTapDonationButton()
}
}
}
}