DefaultMapView()
}
ForEach(maps) { map in
- NavigationLink(destination: MapDetailView(map: map)) {
+ NavigationLink(
+ destination: MapDetailView(map: map, title: map.title ?? "", content: map.content ?? "")
+ ) {
HStack {
Text(map.title ?? "Untitled Map")
Spacer()
.foregroundColor(Color.black)
.cornerRadius(2.0)
}.padding(.leading, 8.0)
+ }.contextMenu {
+ Button(
+ action: { store.send(.deleteMap(map: map)) },
+ label: {
+ Image(systemName: "trash")
+ Text("Delete")
+ })
}
}
.onDelete(perform: deleteMaps)
}
}
}
+ DefaultMapView()
}
}