feat(auth): 인증 후 콘텐츠 설정과 개발용 모의 인증을 추가한다
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
import SwiftUI
|
||||
|
||||
import Bootpay
|
||||
import BootpayUI
|
||||
import Kingfisher
|
||||
import RefreshableScrollView
|
||||
|
||||
@@ -33,28 +32,23 @@ struct MyPageView: View {
|
||||
BaseView(isLoading: $viewModel.isLoading) {
|
||||
if !token.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty &&
|
||||
viewModel.isShowAuthView {
|
||||
BootpayUI(payload: payload, requestType: BootpayRequest.TYPE_AUTHENTICATION)
|
||||
.onConfirm {
|
||||
DEBUG_LOG("onConfirm: \($0)")
|
||||
return true
|
||||
}
|
||||
.onCancel {
|
||||
DEBUG_LOG("onCancel: \($0)")
|
||||
}
|
||||
.onError {
|
||||
DEBUG_LOG("onError: \($0)")
|
||||
AuthVerificationView(
|
||||
payload: payload,
|
||||
onCancel: {},
|
||||
onError: {
|
||||
viewModel.errorMessage = I18n.Main.Auth.authenticationError
|
||||
viewModel.isShowPopup = true
|
||||
viewModel.isShowAuthView = false
|
||||
}
|
||||
.onDone {
|
||||
DEBUG_LOG("onDone: \($0)")
|
||||
},
|
||||
onDone: {
|
||||
viewModel.authVerify($0)
|
||||
}
|
||||
.onClose {
|
||||
DEBUG_LOG("onClose")
|
||||
viewModel.isShowAuthView = false
|
||||
viewModel.presentAuthContentSettings()
|
||||
},
|
||||
onClose: {
|
||||
viewModel.isShowAuthView = false
|
||||
}
|
||||
)
|
||||
} else {
|
||||
VStack(spacing: 0) {
|
||||
// Header
|
||||
@@ -180,7 +174,7 @@ struct MyPageView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.sodaToast(isPresented: $viewModel.isShowPopup, message: viewModel.errorMessage, autohideIn: 2)
|
||||
.authContentSettings(viewModel: viewModel)
|
||||
.onAppear {
|
||||
payload.applicationId = BOOTPAY_APP_ID
|
||||
payload.price = 0
|
||||
|
||||
Reference in New Issue
Block a user