I am struggling to figure out the following error that appears twice in this file:
Argument passed to call that takes no arguments
Argument passed to call that takes no arguments
Please help! I will post the code below here.
@ViewBuilder
private func viewForUserType(using userId: String) -> some View {
switch session.userType {
case .vendor:
VendorHomeView().environmentObject(session) // Correct if no args needed
case .eventOrganizer:
OrganizerHomePage(userId: userId).environmentObject(session) // Ensure userId is required
default:
FirstView().environmentObject(session)
}
}
Lori Gronemeyer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2