Skip to content

Commit

Permalink
πŸͺ›[chore]: ν”„λ‘œν•„ μˆ˜μ •
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy-wonji committed Dec 4, 2023
1 parent 6e2d73d commit b9feb23
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public class AuthorizationViewModel: ObservableObject {
self?.signupToViewModel(model)
self?.userid = model.data?.id ?? .zero
print("둜그인 μ‹€νŒ¨", model)
failLoginCompletion()
succesCompletion(model)
}
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class CommonViewViewModel: ObservableObject {
@Published public var coreViewPath: [CoreViewState] = []

@Published public var firstUserPOPUP: Bool = false
@Published public var showDeleteAuthPOPUP: Bool = false

@Published public var selectedTab: Tab = .home
@Published public var goToMainView: Bool = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ public struct ProfileView: View {
}

.navigationDestination(isPresented: $profileViewModel.gotoOtherSettingView) {
OtherSettingView(viewModel: viewModel, appState: appState)
.environmentObject(appState)
.environmentObject(authViewModel)
OtherSettingView(viewModel: viewModel, appState: appState, authViewModel: authViewModel)
.navigationBarBackButtonHidden()
}

Expand Down Expand Up @@ -491,8 +489,6 @@ public struct ProfileView: View {
viewModel.isLogin = false
viewModel.isLoginCheck = false
authViewModel.randomAuthNickName = ""
presentationMode.wrappedValue.dismiss()

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,19 @@ public struct OtherSettingView: View {
@StateObject private var appState: AppState
@StateObject private var viewModel: CommonViewViewModel
@StateObject private var profileViewModel: ProfileViewViewModel = ProfileViewViewModel()
@EnvironmentObject var authViewModel: AuthorizationViewModel
@StateObject var authViewModel: AuthorizationViewModel

@Environment(\.presentationMode) var presentationMode

public init(viewModel: CommonViewViewModel, appState: AppState) {
public init(
viewModel: CommonViewViewModel,
appState: AppState,
authViewModel: AuthorizationViewModel

) {
self._appState = StateObject(wrappedValue: appState)
self._viewModel = StateObject(wrappedValue: viewModel)
self._authViewModel = StateObject(wrappedValue: authViewModel)
}

public var body: some View {
Expand Down Expand Up @@ -125,7 +131,13 @@ public struct OtherSettingView: View {
}

@ViewBuilder
private func listItemView(showArrow: Bool, showLine: Bool, text: String, versionText: String ,goToDeatilView: @escaping () -> Void) -> some View {
private func listItemView(
showArrow: Bool,
showLine: Bool,
text: String,
versionText: String ,
goToDeatilView: @escaping () -> Void
) -> some View {
VStack(spacing: .zero) {
Spacer()
.frame(height: 20)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ import PopupView

struct WithDrawView: View {
@StateObject private var profileViewModel: ProfileViewViewModel = ProfileViewViewModel()
@ObservedObject var viewModel: CommonViewViewModel
@ObservedObject var authViewModel: AuthorizationViewModel
@StateObject var viewModel: CommonViewViewModel
@StateObject var authViewModel: AuthorizationViewModel
@Environment(\.presentationMode) var presentationMode

public init(
authViewModel: AuthorizationViewModel,
viewModel: CommonViewViewModel
) {
self._authViewModel = ObservedObject(wrappedValue: authViewModel)
self._viewModel = ObservedObject(wrappedValue: viewModel)
self._authViewModel = StateObject(wrappedValue: authViewModel)
self._viewModel = StateObject(wrappedValue: viewModel)
}

var body: some View {
Expand Down

0 comments on commit b9feb23

Please sign in to comment.