From 4099520396b85008906307b4ed3af02c949199aa Mon Sep 17 00:00:00 2001
From: Johanna Szepanski <johanna.szepanski@softhouse.se>
Date: Mon, 9 Dec 2024 14:27:52 +0100
Subject: [PATCH] fixed MR comments

---
 src/components/Job/JobStatus.tsx | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/components/Job/JobStatus.tsx b/src/components/Job/JobStatus.tsx
index e9d44402..320bc6a5 100644
--- a/src/components/Job/JobStatus.tsx
+++ b/src/components/Job/JobStatus.tsx
@@ -7,14 +7,15 @@ import {
   IconUnknown
 } from "@ess-ics/ce-ui-common";
 import { theme } from "../../style/Theme";
+import { JobDetails } from "../../store/deployApi";
 
 interface JobStatusProps {
-  status: string | undefined;
+  status: JobDetails["status"];
 }
 
-const getStatus = (status: string) => {
+const getStatus = (status: JobDetails["status"]) => {
   switch (status) {
-    case STEPPER_STATES.QUEDUED:
+    case STEPPER_STATES.QUEUED:
       return {
         label: "Queued",
         icon: IconRunning
@@ -43,8 +44,7 @@ const getStatus = (status: string) => {
 };
 
 export const JobStatus = ({ status }: JobStatusProps) => {
-  const convertedStatus = status || "";
-  const activeStep = getStatus(convertedStatus);
+  const activeStep = getStatus(status);
   const Icon = activeStep.icon;
 
   return (
@@ -53,7 +53,7 @@ export const JobStatus = ({ status }: JobStatusProps) => {
       labelPosition="right"
       LabelProps={{
         color:
-          convertedStatus === STEPPER_STATES.FAILED
+          status === STEPPER_STATES.FAILED
             ? theme.palette.status.fail.main
             : "inherit"
       }}
-- 
GitLab