aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/components/SubmitStatusLabel.tsx
blob: e511db21cd16b3418fc2e4bc16de4f78d024a295 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import type { components } from "../api/schema";

type Props = {
  status: components["schemas"]["ExecutionStatus"];
};

export default function SubmitStatusLabel({ status }: Props) {
  switch (status) {
    case "none":
      return "提出待ち";
    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 "!内部エラー!";
  }
}