Skip to content

Instantly share code, notes, and snippets.

@scott-lydon
Created May 4, 2021 20:55
Show Gist options
  • Save scott-lydon/f1f624ff841457c3a332dad283063c53 to your computer and use it in GitHub Desktop.
Save scott-lydon/f1f624ff841457c3a332dad283063c53 to your computer and use it in GitHub Desktop.
Binding False positive
struct CreateAccountViewModel {
var image: Image = Image("IntroImage")
var accentText: String = "Choose Account type"
var choosePathVM: ChoosePathViewModel = ChoosePathViewModel(index: 0, explanations: [.employee, .business])
var buttonImage: Image = Image(systemName: .rightArrowLine)
var spacerHeight: CGFloat = 40
func sendHeader() { headerAction?(choosePathVM.current) }
var currentHeader: HeaderBody { choosePathVM.current }
var employeeDestination: Bool { choosePathVM.current.header == HeaderBody.employee.header }
var formModel: SignupFormViewModel { employeeDestination ? .employee : .business}
var authViewModel: AuthViewModel { employeeDestination ? .employeeForm : .businessForm }
var headerAction: HeaderBodyAction? = nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment