성인 라이브 입장에 본인인증 흐름 추가
라이브 지금 항목 탭을 상위에서 처리 가능하도록 노출
This commit is contained in:
@@ -14,6 +14,12 @@ struct LiveView: View {
|
||||
@StateObject var appState = AppState.shared
|
||||
@AppStorage("token") private var token: String = UserDefaults.string(forKey: UserDefaultsKey.token)
|
||||
@AppStorage("role") private var role: String = UserDefaults.string(forKey: UserDefaultsKey.role)
|
||||
|
||||
let onTapLiveNowItem: (Int, Bool) -> Void
|
||||
|
||||
init(onTapLiveNowItem: @escaping (Int, Bool) -> Void = { _, _ in }) {
|
||||
self.onTapLiveNowItem = onTapLiveNowItem
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
@@ -61,6 +67,9 @@ struct LiveView: View {
|
||||
AppState.shared.setAppStep(step: .login)
|
||||
}
|
||||
},
|
||||
onTapItem: { item in
|
||||
onTapLiveNowItem(item.roomId, item.isAdult)
|
||||
},
|
||||
onTapCreateLive: {
|
||||
if !token.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
|
||||
AppState.shared.setAppStep(step: .createLive(timeSettingMode: .NOW, onSuccess: onCreateSuccess))
|
||||
|
||||
Reference in New Issue
Block a user