mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-08-09 11:40:53 +08:00
Scroll to the top every time we get a new task (#1293)
This commit is contained in:
@@ -115,6 +115,7 @@ export const Task = () => {
|
||||
|
||||
useEffect(() => {
|
||||
taskEvent({ action: "NEW_TASK" });
|
||||
scrollToTop(rootEl.current);
|
||||
}, [task.id]);
|
||||
|
||||
const onReplyChanged = useCallback(
|
||||
@@ -128,7 +129,6 @@ export const Task = () => {
|
||||
if (taskStatus.mode === "REVIEW") {
|
||||
taskEvent({ action: "SET_SUBMITTED" });
|
||||
await completeTask(replyContent.current);
|
||||
scrollToTop(rootEl.current);
|
||||
}
|
||||
}, [taskStatus.mode, completeTask]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user