aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/components/SubmitStatusLabel.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/app/components/SubmitStatusLabel.tsx')
-rw-r--r--frontend/app/components/SubmitStatusLabel.tsx26
1 files changed, 26 insertions, 0 deletions
diff --git a/frontend/app/components/SubmitStatusLabel.tsx b/frontend/app/components/SubmitStatusLabel.tsx
new file mode 100644
index 0000000..e0ecc27
--- /dev/null
+++ b/frontend/app/components/SubmitStatusLabel.tsx
@@ -0,0 +1,26 @@
+import type { SubmitResultStatus } from "../models/SubmitResult";
+
+type Props = {
+ status: SubmitResultStatus;
+};
+
+export default function SubmitStatusLabel({ status }: Props) {
+ switch (status) {
+ case "waiting_submission":
+ return null;
+ case "running":
+ return "実行中...";
+ case "success":
+ return "成功";
+ case "wrong_answer":
+ return "テスト失敗";
+ case "timeout":
+ return "時間切れ";
+ case "compile_error":
+ return "コンパイルエラー";
+ case "runtime_error":
+ return "実行時エラー";
+ case "internal_error":
+ return "!内部エラー!";
+ }
+}