@State private var email = ""
@State private var password = ""
@State private var user = User(id: "", restaurants: [""])
@State private var restaurant = Restaurant(id: "", name: "", location: "")
@State private var isLoggedIn = false
@State private var errorMessage = ""
@State private var showHowToGetLoginInfo = false
Remove
@State private var user = User(id: "", restaurants: [""])
@State private var restaurant = Restaurant(id: "", name: "", location: "")
Move rest into the login view model, create the loginviewmodel in the content view and pass it down into the loginview. We do this so that if we need to access the loginviewmodel from other views we can.
Login View contains this code:
Remove
Move rest into the login view model, create the loginviewmodel in the content view and pass it down into the loginview. We do this so that if we need to access the loginviewmodel from other views we can.