fix: sheet bindings and bash typo in TrackerView
This commit is contained in:
@@ -115,7 +115,7 @@ struct HabitListView: View {
|
||||
.presentationDragIndicator(.visible)
|
||||
.presentationBackground(Color(hex: "0a0a1a"))
|
||||
}
|
||||
.sheet(item: ) { habit in
|
||||
.sheet(item: $editingHabit) { habit in
|
||||
EditHabitView(isPresented: .constant(true), habit: habit) { await loadHabits(refresh: true) }
|
||||
.presentationDetents([.large])
|
||||
.presentationDragIndicator(.visible)
|
||||
@@ -146,7 +146,7 @@ struct HabitListView: View {
|
||||
await loadHabits(refresh: true)
|
||||
} catch APIError.serverError(let code, _) where code == 409 {
|
||||
await MainActor.run {
|
||||
if let idx = habits.firstIndex(where: { /bin/bash.id == habit.id }) {
|
||||
if let idx = habits.firstIndex(where: { $0.id == habit.id }) {
|
||||
habits[idx].completedToday = true
|
||||
}
|
||||
}
|
||||
@@ -298,7 +298,7 @@ struct TaskListView: View {
|
||||
.presentationDragIndicator(.visible)
|
||||
.presentationBackground(Color(hex: "0a0a1a"))
|
||||
}
|
||||
.sheet(item: ) { task in
|
||||
.sheet(item: $editingTask) { task in
|
||||
EditTaskView(isPresented: .constant(true), task: task) { await loadTasks(refresh: true) }
|
||||
.presentationDetents([.medium, .large])
|
||||
.presentationDragIndicator(.visible)
|
||||
|
||||
Reference in New Issue
Block a user