feat(channel): 선물 보내기 버튼을 추가한다

This commit is contained in:
Yu Sung
2026-10-06 14:18:38 +09:00
parent ff460485d6
commit def8914daf
2 changed files with 28 additions and 0 deletions
@@ -7,6 +7,15 @@ struct CreatorChannelTalkActionSection: View {
let onTapTalk: () -> Void
let onTapDm: () -> Void
private var shouldShowGiftButton: Bool {
let normalizedCountryCode = UserDefaults
.string(forKey: .countryCode)
.trimmingCharacters(in: .whitespacesAndNewlines)
.uppercased()
let isKoreanCountry = normalizedCountryCode.isEmpty || normalizedCountryCode == "KR"
return isOwnCreatorChannel == false && isDmAvailable && isKoreanCountry && LanguageHeaderProvider.current == "ko"
}
var body: some View {
HStack(spacing: SodaSpacing.s8) {
Spacer()
@@ -51,6 +60,20 @@ struct CreatorChannelTalkActionSection: View {
.buttonStyle(.plain)
}
if shouldShowGiftButton {
Button(action: {}) {
Text(I18n.CreatorChannelHome.sendGift)
.appFont(size: 16, weight: .medium)
.foregroundColor(.white)
.padding(SodaSpacing.s12)
.overlay(
Capsule()
.stroke(Color.white.opacity(0.3), lineWidth: 1)
)
}
.buttonStyle(.plain)
}
Spacer()
}
.frame(height: 44)