diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-12 05:54:49 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-12 05:54:49 +0900 |
| commit | 3074f8d74330a2c238040755b758230d682a4bc4 (patch) | |
| tree | 3c45267ee25aa78be1ad4c31e0c09894e656b506 /frontend/app/components/SubmitStatusLabel.tsx | |
| parent | 7527e54bba0c528015ce402bfa4534c1ab6ca1da (diff) | |
| parent | b37d6f213c2f3b19631e5067f39a7106859faaed (diff) | |
| download | phperkaigi-2025-albatross-3074f8d74330a2c238040755b758230d682a4bc4.tar.gz phperkaigi-2025-albatross-3074f8d74330a2c238040755b758230d682a4bc4.tar.zst phperkaigi-2025-albatross-3074f8d74330a2c238040755b758230d682a4bc4.zip | |
Merge branch 'feat/play-page'
Diffstat (limited to 'frontend/app/components/SubmitStatusLabel.tsx')
| -rw-r--r-- | frontend/app/components/SubmitStatusLabel.tsx | 26 |
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 "!内部エラー!"; + } +} |
