feat(channel): 선물 보내기 버튼을 추가한다
This commit is contained in:
+23
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user