Recipe edit view polish

This commit is contained in:
VincentMeilinger
2024-03-05 21:42:02 +01:00
parent b5dbaad9aa
commit 11359e11d4
11 changed files with 157 additions and 137 deletions

View File

@@ -51,7 +51,7 @@ struct RecipeTabView: View {
SettingsView()
}
.navigationDestination(isPresented: $viewModel.presentEditView) {
RecipeView(viewModel: RecipeView.ViewModel())
RecipeView(isPresented: $viewModel.presentEditView, viewModel: RecipeView.ViewModel())
}
} detail: {
NavigationStack {

View File

@@ -34,7 +34,7 @@ struct SearchTabView: View {
}
}
.navigationDestination(for: Recipe.self) { recipe in
RecipeView(viewModel: RecipeView.ViewModel(recipe: recipe))
RecipeView(isPresented: .constant(true), viewModel: RecipeView.ViewModel(recipe: recipe))
}
.searchable(text: $viewModel.searchText, prompt: "Search recipes/keywords")
}