Skip to content

Instantly share code, notes, and snippets.

@dinotrnka
Created January 17, 2023 12:33
Show Gist options
  • Save dinotrnka/009950b712122946b6a2318f510de5ae to your computer and use it in GitHub Desktop.
Save dinotrnka/009950b712122946b6a2318f510de5ae to your computer and use it in GitHub Desktop.
...
if viewModel.error == .noInternet {
Text("No internet")
.fontWeight(.bold)
.foregroundColor(.red)
} else if viewModel.error != nil {
Text("Login error")
.fontWeight(.bold)
.foregroundColor(.red)
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment