diff --git a/src/routes/health-dashboard/index.tsx b/src/routes/health-dashboard/index.tsx index b711b0f..1bdfdbf 100644 --- a/src/routes/health-dashboard/index.tsx +++ b/src/routes/health-dashboard/index.tsx @@ -4,7 +4,7 @@ import { getHealthData } from "../../state/slices/healthSlice"; import { DocumentMeta } from "../../components/DocumentMeta/DocumentMeta"; import { useCallback, useEffect, useMemo, useState } from "react"; import { useAppDispatch, useAppSelector } from "../../state/hooks"; -import { IconWarning } from "@nasa-jpl/react-stellar"; +import { IconWarning, Error } from "@nasa-jpl/react-stellar"; import React from "react"; import { Link } from "react-router-dom"; @@ -30,6 +30,9 @@ const StatusCellRenderer = (props:CustomCellRendererProps) => { function HealthDashboard() { + const [healthApiError, setHealthApiError] = useState(false); + const healthApiErrorMessage = "Application List Unavailable"; + const dispatch = useAppDispatch(); const healthState = useAppSelector((state) => { @@ -98,6 +101,7 @@ function HealthDashboard() { // Do something to handle the successful fetching of data } else if (healthState.status === "failed") { // Do something to handle the error + setHealthApiError(true); console.log(healthState.error); } @@ -112,6 +116,7 @@ function HealthDashboard() {

Health Dashboard

+ { healthApiError && {healthApiErrorMessage} }