인증 완료 후 동작 실행

This commit is contained in:
Yu Sung
2026-01-14 11:31:08 +09:00
parent 1b583eabba
commit 4354530372
3 changed files with 29 additions and 15 deletions

View File

@@ -12,6 +12,7 @@ import BootpayUI
struct HomeTabView: View {
@StateObject var viewModel = HomeTabViewModel()
@StateObject var liveViewModel = LiveViewModel()
@StateObject var mypageViewModel = MyPageViewModel()
@AppStorage("token") private var token: String = UserDefaults.string(forKey: UserDefaultsKey.token)
@AppStorage("role") private var role: String = UserDefaults.string(forKey: UserDefaultsKey.role)
@@ -460,12 +461,15 @@ struct HomeTabView: View {
AppState.shared.isShowErrorPopup = true
isShowAuthView = false
}
.onDone { _ in
auth = true
isShowAuthView = false
if let action = pendingAction {
pendingAction = nil
action()
.onDone {
DEBUG_LOG("onDone: \($0)")
mypageViewModel.authVerify($0) {
auth = true
isShowAuthView = false
if let action = pendingAction {
pendingAction = nil
action()
}
}
}
.onClose {