blob: f6e19bb90567f620e72885057b316695054e3f87 (
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
|
import type { SubmitResultStatus } from "../models/SubmitResult";
type Props = {
status: SubmitResultStatus;
};
export default function SubmitStatusLabel({ status }: Props) {
switch (status) {
case "running":
return <span>Running...</span>;
case "success":
return <span>Accepted</span>;
case "wrong_answer":
return <span>Wrong Answer</span>;
case "timeout":
return <span>Time Limit Exceeded</span>;
case "compile_error":
return <span>Compile Error</span>;
case "runtime_error":
return <span>Runtime Error</span>;
case "internal_error":
return <span>Internal Error</span>;
}
}
|