콘텐츠 상세 - 대여만 가능한 콘텐츠의 경우 소장 버튼이 보이지 않고 가격의 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

@@ -14,6 +14,7 @@ struct ContentOrderConfirmDialogView: View {
let audioContent: GetAudioContentDetailResponse
let orderType: OrderType
let isOnlyRental: Bool
let onClickConfirm: () -> Void
var body: some View {
@@ -90,9 +91,15 @@ struct ContentOrderConfirmDialogView: View {
.resizable()
.frame(width: 16.7, height: 16.7)
Text("\(orderType == .RENTAL ? Int(ceil(Double(audioContent.price) * 0.6)) : audioContent.price)")
.font(.custom(Font.bold.rawValue, size: 13.3))
.foregroundColor(Color(hex: "eeeeee"))
if orderType == .RENTAL {
Text("\(isOnlyRental ? audioContent.price : Int(ceil(Double(audioContent.price) * 0.6)))")
.font(.custom(Font.bold.rawValue, size: 13.3))
.foregroundColor(Color(hex: "eeeeee"))
} else {
Text("\(audioContent.price)")
.font(.custom(Font.bold.rawValue, size: 13.3))
.foregroundColor(Color(hex: "eeeeee"))
}
Spacer()
}