bbovenzi commented on code in PR #44656:
URL: https://github.com/apache/airflow/pull/44656#discussion_r1876388956


##########
airflow/ui/src/components/ui/Status.tsx:
##########
@@ -28,12 +28,13 @@ import { stateColor } from "src/utils/stateColor";
 type StatusValue = DagRunState | TaskInstanceState;
 
 export type StatusProps = {
-  state?: StatusValue;
+  state: StatusValue | null;
 } & ChakraStatus.RootProps;
 
 export const Status = React.forwardRef<HTMLDivElement, StatusProps>(
   ({ children, state, ...rest }, ref) => {
-    const colorPalette = state === undefined ? "info" : stateColor[state];
+    // "null" is actually a string on stateColor
+    const colorPalette = stateColor[state ?? "null"];

Review Comment:
   The entire `stateColor` object is a placeholder for now. So I'm happy to 
update it if we change it on the server side too.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to