From ad42f43d1c3c8f0da0ac31b8016e2f20f1765720 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 18 Aug 2024 00:38:07 +0900 Subject: refactor(frontend): extract components for gaming page --- .../components/Gaming/ExecStatusIndicatorIcon.tsx | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 frontend/app/components/Gaming/ExecStatusIndicatorIcon.tsx (limited to 'frontend/app/components/Gaming/ExecStatusIndicatorIcon.tsx') diff --git a/frontend/app/components/Gaming/ExecStatusIndicatorIcon.tsx b/frontend/app/components/Gaming/ExecStatusIndicatorIcon.tsx new file mode 100644 index 0000000..8daf48c --- /dev/null +++ b/frontend/app/components/Gaming/ExecStatusIndicatorIcon.tsx @@ -0,0 +1,51 @@ +import { + faBan, + faCircle, + faCircleCheck, + faCircleExclamation, + faRotate, +} from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import type { ExecResultStatus } from "../../models/ExecResult"; + +type Props = { + status: ExecResultStatus; +}; + +export default function ExecStatusIndicatorIcon({ status }: Props) { + switch (status) { + case "waiting_submission": + return ( + + ); + case "running": + return ( + + ); + case "success": + return ( + + ); + case "canceled": + return ( + + ); + default: + return ( + + ); + } +} -- cgit v1.2.3-70-g09d2