website: Fix regression that broke the ability to review unchanged rankings.

This was caused by the init effect in Task.tsx running _after_ the task submits it's default reply validity as part of it's init effect. Clearly we need to refactor the way Task.tsx works.
This commit is contained in:
Adrian Cowan
2023-01-30 23:45:58 +11:00
parent 091e93392b
commit 6b7cb74e5d
+1 -1
View File
@@ -74,7 +74,7 @@ export const Task = () => {
): TaskStatus => {
switch (event.action) {
case "NEW_TASK":
return { mode: "EDIT", replyValidity: "INVALID" };
return status.mode !== "EDIT" ? { mode: "EDIT", replyValidity: "INVALID" } : status;
case "UPDATE_VALIDITY":
return status.mode === "EDIT" ? { mode: "EDIT", replyValidity: event.replyValidity } : status;
case "ACCEPT_DEFAULT":