// // UserProfileLiveView.swift // SodaLive // // Created by klaus on 2023/08/11. // import SwiftUI import Kingfisher struct UserProfileLiveView: View { let userId: Int let liveRoomList: [LiveRoomResponse] let onClickParticipant: (LiveRoomResponse) -> Void let onClickReservation: (LiveRoomResponse) -> Void var body: some View { VStack(alignment: .leading, spacing: 26.7) { HStack(spacing: 0) { Text("라이브") .font(.custom(Font.bold.rawValue, size: 16.7)) .foregroundColor(Color(hex: "eeeeee")) } VStack(spacing: 13.3) { ForEach(0.. 0 ? "\(liveRoom.price)코인으로 " : "")예약하기") .font(.custom(Font.bold.rawValue, size: 13.3)) .foregroundColor(Color(hex: "000000")) .frame( width: screenSize().width - 26.7 - 100, height: 36.7 ) .background(Color(hex: "fdca2f")) .cornerRadius(5.3) .onTapGesture { onClickReservation(liveRoom) } } } } else { Text("다시듣기를 지원하지 않습니다") .font(.custom(Font.bold.rawValue, size: 13.3)) .foregroundColor(Color(hex: "777777")) .frame( width: screenSize().width - 26.7 - 100, height: 36.7 ) .background(Color(hex: "525252")) .cornerRadius(5.3) } } } .frame(height: 116.7) Rectangle() .frame(height: 1) .foregroundColor(Color(hex: "909090").opacity(0.5)) } } } } } }