feat(gift): 선물 발송 표시를 보정한다
This commit is contained in:
@@ -3,6 +3,7 @@ import SwiftUI
|
||||
struct GiftAgreementRow: View {
|
||||
let title: String
|
||||
@Binding var isAgreed: Bool
|
||||
var policyURL: URL? = GiftConstants.termsURL
|
||||
|
||||
var body: some View {
|
||||
HStack(alignment: .top, spacing: SodaSpacing.s4) {
|
||||
@@ -25,7 +26,7 @@ struct GiftAgreementRow: View {
|
||||
.buttonStyle(.plain)
|
||||
.accessibilityValue(isAgreed ? "동의함" : "동의 안 함")
|
||||
|
||||
if let url = GiftConstants.termsURL {
|
||||
if let url = policyURL {
|
||||
Link(destination: url) {
|
||||
Text("(필수)")
|
||||
.underline()
|
||||
|
||||
@@ -2,6 +2,7 @@ import Foundation
|
||||
|
||||
enum GiftConstants {
|
||||
static let termsURL = URL(string: "https://app.notion.com/p/3eb27b359673802b937ae741ab7b4ad3")
|
||||
static let damagePolicyURL = URL(string: "https://app.notion.com/p/3f227b3596738018ba5dea2e5205293b")
|
||||
static let addressSearchAvailable = false
|
||||
static let inquiryStep: AppStep = .serviceCenter
|
||||
static let feedbackStep: AppStep = .serviceCenter
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import SwiftUI
|
||||
|
||||
struct GiftSendView: View {
|
||||
private let recipientCreatorProfileImageUrl: String
|
||||
@StateObject private var viewModel: GiftSendViewModel
|
||||
@State private var hasAppeared = false
|
||||
|
||||
init(recipientMemberId: Int, recipientCreatorNickname: String) {
|
||||
init(recipientMemberId: Int, recipientCreatorNickname: String, recipientCreatorProfileImageUrl: String) {
|
||||
self.recipientCreatorProfileImageUrl = recipientCreatorProfileImageUrl
|
||||
_viewModel = StateObject(wrappedValue: GiftSendViewModel(
|
||||
recipientMemberId: recipientMemberId,
|
||||
recipientCreatorNickname: recipientCreatorNickname,
|
||||
@@ -12,7 +14,7 @@ struct GiftSendView: View {
|
||||
AppState.shared.replaceCurrentAppStep(
|
||||
step: .giftDetail(applicationNo: applicationNo),
|
||||
ifCurrentStep: { step in
|
||||
guard case .giftSend(let memberId, let nickname) = step else { return false }
|
||||
guard case .giftSend(let memberId, let nickname, _) = step else { return false }
|
||||
return memberId == recipientMemberId && nickname == recipientCreatorNickname
|
||||
}
|
||||
)
|
||||
@@ -77,7 +79,8 @@ struct GiftSendView: View {
|
||||
VStack(alignment: .leading, spacing: SodaSpacing.s14) {
|
||||
sectionTitle("받는 크리에이터")
|
||||
HStack(spacing: SodaSpacing.s12) {
|
||||
Circle().fill(Color.gray800).frame(width: 38, height: 38)
|
||||
DownsampledKFImage(url: URL(string: recipientCreatorProfileImageUrl), size: CGSize(width: 38, height: 38))
|
||||
.clipShape(Circle())
|
||||
.accessibilityHidden(true)
|
||||
Text(viewModel.recipientCreatorNickname)
|
||||
.appFont(size: 16, weight: .bold)
|
||||
@@ -155,7 +158,8 @@ struct GiftSendView: View {
|
||||
}
|
||||
.disabled(viewModel.categories.isEmpty)
|
||||
if viewModel.selectedCategory?.requiresDamageWaiver == true {
|
||||
GiftAgreementRow(title: "파손 및 분실 면책 사항에 동의합니다.", isAgreed: $viewModel.damageWaiverAgreed)
|
||||
GiftAgreementRow(title: "파손 및 분실 면책 사항에 동의합니다.", isAgreed: $viewModel.damageWaiverAgreed,
|
||||
policyURL: GiftConstants.damagePolicyURL)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user