I’m making an attempt to create a easy transition from the signup view to the principle tab view. I’m utilizing navigation hyperlink to modify screens and it’s giving me a error on the entry level
Sort ‘Tailor_HelperApp’ doesn’t conform to protocol ‘App’
How do I arrange this code to efficiently transition from the signup display to the principle tab view?
@primary
struct Tailor_HelperApp: App {
let consumer: Person
@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate
var physique: some Scene {
WindowGroup {
ContentView().environmentObject(AuthViewModel())
}
struct ContentView: View {
let consumer: Person
@EnvironmentObject var viewModel: AuthViewModel
var physique: some View {
Group{
if viewModel.userSession == nil {
SignUp(consumer: consumer)
}else{
if let consumer = viewModel.currentUser {
MainTabView(consumer: consumer)
}
let consumer: Person
@EnvironmentObject var viewModel: AuthViewModel
var physique: some View {
Button{
viewModel.register(withEmail: electronic mail, password: password, picture: picture, username: username)
}label: {
NavigationLink(vacation spot: MainTabView(consumer: consumer)) {
Textual content("Signal Up")
.font(.headline)
.foregroundColor(.white)
.body(width: 360, peak: 50)
.background(Colour.black)
.clipShape(Capsule())
.cornerRadius(25)
.padding()
}
.offset(y:190)
Spacer()
}