feat(auth): 인증 후 콘텐츠 설정과 개발용 모의 인증을 추가한다
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
|
||||
import SwiftUI
|
||||
import Bootpay
|
||||
import BootpayUI
|
||||
|
||||
struct HomeTabView: View {
|
||||
@StateObject var viewModel = HomeTabViewModel()
|
||||
@@ -479,36 +478,34 @@ struct HomeTabView: View {
|
||||
|
||||
viewModel.fetchData()
|
||||
}
|
||||
.fullScreenCover(isPresented: $isShowAuthView) {
|
||||
BootpayUI(payload: payload, requestType: BootpayRequest.TYPE_AUTHENTICATION)
|
||||
.onConfirm { _ in
|
||||
true
|
||||
}
|
||||
.onCancel { _ in
|
||||
.fullScreenCover(isPresented: $isShowAuthView, onDismiss: mypageViewModel.presentAuthContentSettings) {
|
||||
AuthVerificationView(
|
||||
payload: payload,
|
||||
onCancel: {
|
||||
isShowAuthView = false
|
||||
}
|
||||
.onError { _ in
|
||||
},
|
||||
onError: {
|
||||
AppState.shared.errorMessage = I18n.Chat.Auth.authenticationError
|
||||
AppState.shared.isShowErrorPopup = true
|
||||
isShowAuthView = false
|
||||
}
|
||||
.onDone {
|
||||
DEBUG_LOG("onDone: \($0)")
|
||||
},
|
||||
onDone: {
|
||||
let action = pendingAction
|
||||
mypageViewModel.authVerify($0) {
|
||||
auth = true
|
||||
isShowAuthView = false
|
||||
if let action = pendingAction {
|
||||
pendingAction = nil
|
||||
action()
|
||||
}
|
||||
pendingAction = nil
|
||||
action?()
|
||||
}
|
||||
}
|
||||
.onClose {
|
||||
isShowAuthView = false
|
||||
},
|
||||
onClose: {
|
||||
isShowAuthView = false
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
.sodaToast(isPresented: $viewModel.isShowPopup, message: viewModel.errorMessage, autohideIn: 2)
|
||||
.authContentSettings(viewModel: mypageViewModel)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user