Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/components/dashboard/planning-overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,10 @@ function TasksCard({ dashboardData }: { dashboardData: DashboardData | null }) {
const priorityQueue = dashboardData?.taskPriorityQueue
const { tasks, toggleTask } = useTasksCardState(priorityQueue?.tasks ?? EMPTY_PRIORITY_TASKS)
const completeTask = api.task.complete.useMutation({
onError: () => toast.error('Failed to update task'),
onError: (_, variables) => {
toggleTask(variables.taskId)
toast.error('Failed to update task')
},
})

const handleToggle = (taskId: string) => {
Expand Down
Loading