성인 라이브 입장에 본인인증 흐름 추가

라이브 지금 항목 탭을 상위에서 처리 가능하도록 노출
This commit is contained in:
Yu Sung
2026-02-02 11:48:12 +09:00
parent 9e97c301b8
commit b985af4497
4 changed files with 130 additions and 43 deletions

View File

@@ -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))