From 1e6df136d8202c8adf65948527f4c3e7583b338c Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Tue, 4 Mar 2025 22:55:01 +0900
Subject: websocket to polling

---
 frontend/app/components/Gaming/SubmitResult.tsx | 34 +++----------------------
 1 file changed, 4 insertions(+), 30 deletions(-)

(limited to 'frontend/app/components/Gaming/SubmitResult.tsx')

diff --git a/frontend/app/components/Gaming/SubmitResult.tsx b/frontend/app/components/Gaming/SubmitResult.tsx
index c626910..a78c79e 100644
--- a/frontend/app/components/Gaming/SubmitResult.tsx
+++ b/frontend/app/components/Gaming/SubmitResult.tsx
@@ -1,47 +1,21 @@
 import React from "react";
-import type { SubmitResult } from "../../types/SubmitResult";
-import BorderedContainer from "../BorderedContainer";
+import type { components } from "../../api/schema";
 import SubmitStatusLabel from "../SubmitStatusLabel";
-import ExecStatusIndicatorIcon from "./ExecStatusIndicatorIcon";
 
 type Props = {
-	result: SubmitResult;
+	status: components["schemas"]["ExecutionStatus"];
 	submitButton?: React.ReactNode;
 };
 
-export default function SubmitResult({ result, submitButton }: Props) {
+export default function SubmitResult({ status, submitButton }: Props) {
 	return (
 		<div className="flex flex-col gap-2">
 			<div className="flex">
 				{submitButton}
 				<div className="grow font-bold text-xl text-center">
-					<SubmitStatusLabel status={result.status} />
+					<SubmitStatusLabel status={status} />
 				</div>
 			</div>
-			<ul className="flex flex-col gap-4">
-				{result.execResults.map((r) => (
-					<li key={r.testcase_id ?? -1}>
-						<BorderedContainer>
-							<div className="flex flex-col gap-2">
-								<div className="flex gap-2">
-									<div className="my-auto">
-										<ExecStatusIndicatorIcon status={r.status} />
-									</div>
-									<div className="font-semibold">{r.label}</div>
-								</div>
-								{r.stdout + r.stderr && (
-									<pre className="overflow-y-hidden max-h-96 p-2 bg-gray-50 rounded-lg border border-gray-300 whitespace-pre-wrap break-words">
-										<code>
-											{r.stdout}
-											{r.stderr}
-										</code>
-									</pre>
-								)}
-							</div>
-						</BorderedContainer>
-					</li>
-				))}
-			</ul>
 		</div>
 	);
 }
-- 
cgit v1.2.3-70-g09d2

