diff options
Diffstat (limited to 'frontend/app/states')
| -rw-r--r-- | frontend/app/states/play.ts | 5 | ||||
| -rw-r--r-- | frontend/app/states/watch.ts | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/frontend/app/states/play.ts b/frontend/app/states/play.ts index 13bd39f..1684367 100644 --- a/frontend/app/states/play.ts +++ b/frontend/app/states/play.ts @@ -172,6 +172,11 @@ export const handleWsSubmitResultMessageAtom = atom( newResult.execResults = prev.execResults.map((r) => r.status === "running" ? { ...r, status: "canceled" } : r, ); + } else { + newResult.execResults = prev.execResults.map((r) => ({ + ...r, + status: "success", + })); } set(submitResultAtom, newResult); if (status === "success" && score !== null) { diff --git a/frontend/app/states/watch.ts b/frontend/app/states/watch.ts index ba3dd2a..5f5c4db 100644 --- a/frontend/app/states/watch.ts +++ b/frontend/app/states/watch.ts @@ -235,6 +235,11 @@ export const handleWsSubmitResultMessageAtom = atom( newResult.execResults = prev.execResults.map((r) => r.status === "running" ? { ...r, status: "canceled" } : r, ); + } else { + newResult.execResults = prev.execResults.map((r) => ({ + ...r, + status: "success", + })); } set(submitResultAtom, newResult); if (status === "success" && score !== null) { |
