mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-07-17 11:23:49 +08:00
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:
@@ -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();
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user