How to make a view

UserApi.shared.loginWithKakaoAccount(prompts: [.Login]) {(oauthToken, error) in

                        if let error = error {

                            print(error)

                        } else {

                            print("LoginSuccee")

                                MainView()

                            _ = oauthToken

                        }

                    }

I want to switch the view when I succeed Is there a way?

It might help to watch /read about the basics of SwiftUI, you have model that you can observe, so when the state of the model changes, your views would update, so your view should use the states to determine how the UI should look like.

How to make a view
 
 
Q