diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-12 01:54:36 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-12 01:54:36 +0900 |
| commit | ab6abc3a7619be89dda1bc3ab0b3f19ff69b575f (patch) | |
| tree | 57f4b6da4682ec43cbd7ba2a51c5866f226b0035 /frontend/app/models/SubmissionResult.ts | |
| parent | b97b245861b93a5ab5f8bde095d9920fabd0cbbd (diff) | |
| download | phperkaigi-2025-albatross-ab6abc3a7619be89dda1bc3ab0b3f19ff69b575f.tar.gz phperkaigi-2025-albatross-ab6abc3a7619be89dda1bc3ab0b3f19ff69b575f.tar.zst phperkaigi-2025-albatross-ab6abc3a7619be89dda1bc3ab0b3f19ff69b575f.zip | |
refactor(frontend): rename SubmissionResult and VerificationResult for consistant naming
Diffstat (limited to 'frontend/app/models/SubmissionResult.ts')
| -rw-r--r-- | frontend/app/models/SubmissionResult.ts | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/frontend/app/models/SubmissionResult.ts b/frontend/app/models/SubmissionResult.ts deleted file mode 100644 index 7311494..0000000 --- a/frontend/app/models/SubmissionResult.ts +++ /dev/null @@ -1,38 +0,0 @@ -import type { VerificationResult } from "./VerificationResult"; - -export type SubmissionResultStatus = - | "running" - | "success" - | "wrong_answer" - | "timeout" - | "compile_error" - | "runtime_error" - | "internal_error"; - -export type SubmissionResult = { - status: SubmissionResultStatus; - verificationResults: VerificationResult[]; -}; - -export function submissionResultStatusToLabel( - status: SubmissionResultStatus | null, -) { - switch (status) { - case null: - return "-"; - case "running": - return "Running..."; - case "success": - return "Accepted"; - case "wrong_answer": - return "Wrong Answer"; - case "timeout": - return "Time Limit Exceeded"; - case "compile_error": - return "Compile Error"; - case "runtime_error": - return "Runtime Error"; - case "internal_error": - return "Internal Error"; - } -} |
