Support deleting a task from a schedule
This commit is contained in:
parent
5345a2a3e1
commit
78ed343a34
10 changed files with 172 additions and 8 deletions
|
@ -79,7 +79,14 @@ export default ({ match, location: { state } }: RouteComponentProps<Params, {},
|
|||
key={task.id}
|
||||
className={'bg-neutral-700 border border-neutral-600 mb-2 px-6 py-4 rounded'}
|
||||
>
|
||||
<ScheduleTaskRow task={task}/>
|
||||
<ScheduleTaskRow
|
||||
task={task}
|
||||
schedule={schedule.id}
|
||||
onTaskRemoved={() => setSchedule(s => ({
|
||||
...s!,
|
||||
tasks: s!.tasks.filter(t => t.id !== task.id),
|
||||
}))}
|
||||
/>
|
||||
</div>
|
||||
))
|
||||
}
|
||||
|
|
Reference in a new issue