From 8cbb00ae115545a5803f6d08283985ca089d7e41 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Mon, 12 Aug 2024 02:11:30 +0900
Subject: feat: add `submitresult` message

---
 frontend/app/components/GolfWatchApp.client.tsx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'frontend/app/components/GolfWatchApp.client.tsx')

diff --git a/frontend/app/components/GolfWatchApp.client.tsx b/frontend/app/components/GolfWatchApp.client.tsx
index 7f582c9..9d3f752 100644
--- a/frontend/app/components/GolfWatchApp.client.tsx
+++ b/frontend/app/components/GolfWatchApp.client.tsx
@@ -161,8 +161,8 @@ export default function GolfWatchApp({
 					setter((prev) => {
 						const ret = { ...prev };
 						ret.submitResult = {
-							...ret.submitResult,
-							execResults: ret.submitResult.execResults.map((r) =>
+							...prev.submitResult,
+							execResults: prev.submitResult.execResults.map((r) =>
 								r.testcase_id === testcase_id && r.status === "running"
 									? {
 											...r,
@@ -182,7 +182,7 @@ export default function GolfWatchApp({
 					setter((prev) => {
 						const ret = { ...prev };
 						ret.submitResult = {
-							...ret.submitResult,
+							...prev.submitResult,
 							status,
 						};
 						if (status === "success") {
@@ -192,7 +192,7 @@ export default function GolfWatchApp({
 								}
 							}
 						} else {
-							ret.submitResult.execResults = ret.submitResult.execResults.map(
+							ret.submitResult.execResults = prev.submitResult.execResults.map(
 								(r) =>
 									r.status === "running" ? { ...r, status: "canceled" } : r,
 							);
-- 
cgit v1.2.3-70-g09d2

