// // LiveNowAllView.swift // SodaLive // // Created by klaus on 2023/08/14. // import SwiftUI import RefreshableScrollView struct LiveNowAllView: View { @StateObject var viewModel = LiveViewModel() @StateObject var liveAllViewModel = LiveAllViewModel() let onClickParticipant: (Int) -> Void var body: some View { BaseView(isLoading: $viewModel.isLoading) { GeometryReader { proxy in VStack(spacing: 0) { DetailNavigationBar(title: "지금 라이브 중 전체보기") RefreshableScrollView( refreshing: $viewModel.isRefresh, action: { viewModel.page = 1 viewModel.isLast = false viewModel.getLiveNowList() }, content: { VStack(spacing: 13.3) { ForEach(0.. 0 { Rectangle() .foregroundColor(Color.black.opacity(0)) .frame(width: screenSize().width, height: 15.3) } } .edgesIgnoringSafeArea(.bottom) } if liveAllViewModel.isShowLiveDetail { LiveDetailView( roomId: liveAllViewModel.selectedRoomId, onClickParticipant: { AppState.shared.isShowPlayer = false onClickParticipant(liveAllViewModel.selectedRoomId) }, onClickReservation: {}, onClickStart: {}, onClickCancel: {}, onClickClose: { withAnimation { liveAllViewModel.isShowLiveDetail = false } } ) } } .onAppear { viewModel.getLiveNowList() } } }