콘텐츠 상세 - 대여만 가능한 콘텐츠의 경우 소장 버튼이 보이지 않고 가격의 100%가 보이도록 수정

This commit is contained in:
Yu Sung
2023-10-22 17:41:56 +09:00
parent 115a30a7b6
commit 995c6adab7
6 changed files with 49 additions and 35 deletions

View File

@@ -91,7 +91,7 @@ struct ContentDetailView: View {
!audioContent.existOrdered &&
audioContent.orderType == nil &&
audioContent.creator.creatorId != UserDefaults.int(forKey: .userId) {
ContentDetailPurchaseButton(price: audioContent.price)
ContentDetailPurchaseButton(price: audioContent.price, isOnlyRental: audioContent.isOnlyRental)
.contentShape(Rectangle())
.padding(.horizontal, 13.3)
.onTapGesture { isShowOrderView = true }
@@ -161,6 +161,7 @@ struct ContentDetailView: View {
ContentOrderDialogView(
isShowing: $isShowOrderView,
price: audioContent.price,
isOnlyRental: audioContent.isOnlyRental,
onTapPurchase: {
viewModel.orderType = $0
isShowOrderConfirmView = true
@@ -186,6 +187,7 @@ struct ContentDetailView: View {
isShowing: $isShowOrderConfirmView,
audioContent: audioContent,
orderType: orderType,
isOnlyRental: audioContent.isOnlyRental,
onClickConfirm: {
viewModel.order(orderType: orderType)
}