Scroll to the top every time we get a new task (#1293)

This commit is contained in:
Pavel Mokin
2023-02-07 20:06:43 +09:00
committed by GitHub
parent e2327295af
commit 801b47949c
+1 -1
View File
@@ -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]);