website: Remove next task button and load new task immediately

Also disable the task inputs while the task is submitted and before the new task is ready in case the users network is slow or something.
This commit is contained in:
Adrian Cowan
2023-01-13 23:40:16 +11:00
parent a97ad13390
commit 5054e19e93
11 changed files with 110 additions and 51 deletions
@@ -24,6 +24,7 @@ export const useGenericTaskAPI = <TaskType extends BaseTask>(taskApiEndpoint: st
onSuccess: async (response) => {
const newTask: ConcreteTaskResponse = await response.json();
setTasks((oldTasks) => [...oldTasks, newTask]);
mutate();
},
});