pierrejeambrun commented on code in PR #61556:
URL: https://github.com/apache/airflow/pull/61556#discussion_r2794272113


##########
airflow-core/src/airflow/ui/src/pages/DagsList/DagsList.tsx:
##########
@@ -206,8 +206,8 @@ export const DagsList = () => {
   const [display, setDisplay] = useLocalStorage<"card" | 
"table">(DAGS_LIST_DISPLAY, "card");
   const dagRunsLimit = display === "card" ? 14 : 1;
 
-  const hidePausedDagsByDefault = 
Boolean(useConfig("hide_paused_dags_by_default"));
-  const defaultShowPaused = hidePausedDagsByDefault ? false : undefined;
+  const configValue = useConfig("hide_paused_dags_by_default");

Review Comment:
   Same



##########
airflow-core/src/airflow/ui/src/pages/DagsList/DagsFilters/DagsFilters.tsx:
##########
@@ -75,7 +75,8 @@ export const DagsFilters = () => {
     tagNamePattern: pattern,
   });
 
-  const hidePausedDagsByDefault = 
Boolean(useConfig("hide_paused_dags_by_default"));
+  const configValue = useConfig("hide_paused_dags_by_default");
+  const hidePausedDagsByDefault = configValue === true || configValue === 
"true";

Review Comment:
   I found the former cleaner, what is the advantage of this syntax?



-- 
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