bbovenzi commented on code in PR #56163:
URL: https://github.com/apache/airflow/pull/56163#discussion_r2417609933
##########
airflow-core/src/airflow/ui/src/pages/Dashboard/PoolSummary/PoolSummary.tsx:
##########
@@ -21,21 +21,36 @@ import { useTranslation } from "react-i18next";
import { BiTargetLock } from "react-icons/bi";
import { Link as RouterLink } from "react-router-dom";
-import { useAuthLinksServiceGetAuthMenus } from "openapi/queries";
+import { type PoolServiceGetPoolsDefaultResponse,
useAuthLinksServiceGetAuthMenus } from "openapi/queries";
import { usePoolServiceGetPools } from "openapi/queries/queries";
+import type { ApiError } from "openapi/requests";
import { PoolBar } from "src/components/PoolBar";
import { useAutoRefresh } from "src/utils";
import { type Slots, slotKeys } from "src/utils/slots";
export const PoolSummary = () => {
const { t: translate } = useTranslation("dashboard");
const refetchInterval = useAutoRefresh({ checkPendingRuns: true });
- const { data, isLoading } = usePoolServiceGetPools(undefined, undefined, {
- refetchInterval,
- });
+
const { data: authLinks } = useAuthLinksServiceGetAuthMenus();
const hasPoolsAccess = authLinks?.authorized_menu_items.includes("Pools");
Review Comment:
I wonder if we should also use this and return undefined before we even try
to fetch anything.
--
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]