diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-22 15:47:28 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-22 15:47:28 +0900 |
| commit | dd541bfa7940959ab8a1d93d58a24cc277c51e48 (patch) | |
| tree | 252defebcd7651ca880cfc635c399b9f42d82148 | |
| parent | 8172d4c463f3782ecf924e641e96f18b4308e6a7 (diff) | |
| download | phperkaigi-2025-albatross-dd541bfa7940959ab8a1d93d58a24cc277c51e48.tar.gz phperkaigi-2025-albatross-dd541bfa7940959ab8a1d93d58a24cc277c51e48.tar.zst phperkaigi-2025-albatross-dd541bfa7940959ab8a1d93d58a24cc277c51e48.zip | |
fix(frontend): workaround exec result
| -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) { |
