Skip to content

Instantly share code, notes, and snippets.

@Dimillian
Created May 4, 2020 06:47
Show Gist options
  • Save Dimillian/e9e1353a39019037b14a570a05e73925 to your computer and use it in GitHub Desktop.
Save Dimillian/e9e1353a39019037b14a570a05e73925 to your computer and use it in GitHub Desktop.
struct CategoryRowView: View {
let category: Backend.Category
var body: some View {
NavigationLink(destination: ItemsListView(viewModel: ItemsViewModel(category: category))) {
HStack {
Image(category.iconName())
Text(category.label())
}
}
}
}
struct ItemsListView: View {
@ObservedObject var viewModel: ItemsViewModel
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment