성인 라이브 입장에 본인인증 흐름 추가
라이브 지금 항목 탭을 상위에서 처리 가능하도록 노출
This commit is contained in:
@@ -12,11 +12,10 @@ struct SectionLiveNowView: View {
|
||||
let items: [GetRoomListResponse]
|
||||
|
||||
let onClickParticipant: (Int) -> Void
|
||||
let onTapItem: (GetRoomListResponse) -> Void
|
||||
let onTapCreateLive: () -> Void
|
||||
let onClickRefresh: () -> Void
|
||||
|
||||
@AppStorage("token") private var token: String = UserDefaults.string(forKey: UserDefaultsKey.token)
|
||||
|
||||
var body: some View {
|
||||
LazyVStack(spacing: 13.3) {
|
||||
HStack(spacing: 0) {
|
||||
@@ -43,24 +42,7 @@ struct SectionLiveNowView: View {
|
||||
LiveNowItemView(item: item, itemWidth: nil)
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
if !token.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
|
||||
AppState.shared.setAppStep(
|
||||
step: .liveDetail(
|
||||
roomId: item.roomId,
|
||||
onClickParticipant: {
|
||||
AppState.shared.isShowPlayer = false
|
||||
onClickParticipant(item.roomId)
|
||||
},
|
||||
onClickReservation: {},
|
||||
onClickStart: {
|
||||
},
|
||||
onClickCancel: {
|
||||
}
|
||||
)
|
||||
)
|
||||
} else {
|
||||
AppState.shared.setAppStep(step: .login)
|
||||
}
|
||||
onTapItem(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -114,6 +96,7 @@ struct SectionLiveNowView_Previews: PreviewProvider {
|
||||
SectionLiveNowView(
|
||||
items: [],
|
||||
onClickParticipant: { _ in },
|
||||
onTapItem: { _ in },
|
||||
onTapCreateLive: {},
|
||||
onClickRefresh: {}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user