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


##########
airflow-core/src/airflow/ui/src/pages/Dashboard/Dashboard.tsx:
##########
@@ -16,23 +16,56 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { Box, Heading } from "@chakra-ui/react";
+import { Box, Heading, VStack } from "@chakra-ui/react";
+
+import type { UIAlert } from "openapi/requests/types.gen";
+import ReactMarkdown from "src/components/ReactMarkdown";
+import { Accordion, Alert } from "src/components/ui";
+import { useConfig } from "src/queries/useConfig";
 
 import { Health } from "./Health";
 import { HistoricalMetrics } from "./HistoricalMetrics";
 import { Stats } from "./Stats";
 
-export const Dashboard = () => (
-  <Box>
-    <Heading mb={4}>Welcome</Heading>
+export const Dashboard = () => {
+  const confAlerts = useConfig("dashboard_alert");
+  const alerts = Array.isArray(confAlerts) ? confAlerts : [];

Review Comment:
   There's an issue with the type checking on useConfig. It is ok to use `as 
Array<UIAlert>` here to make the type checking happy for now



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