diff --git a/src/features/dashboard/components/SystemHealth.tsx b/src/features/dashboard/components/SystemHealth.tsx index de4f3b4..664ac0b 100644 --- a/src/features/dashboard/components/SystemHealth.tsx +++ b/src/features/dashboard/components/SystemHealth.tsx @@ -13,13 +13,14 @@ type SystemHealthProps = { const SystemHealth = ({ startTime, uptime, statuses, isLoading, isError, dateUpdatedAt }: SystemHealthProps) => { const updatedDate = dateUpdatedAt ? new Date(dateUpdatedAt).toLocaleString() : null; + // console.log(statuses); + if (isError) { return Error loading system health.; } if (isLoading) { return Loading system health…; } - return (
@@ -32,7 +33,7 @@ const SystemHealth = ({ startTime, uptime, statuses, isLoading, isError, dateUpd
{statuses?.map((status: SystemHealthStatus) => ( -
+
{status.id}
))} diff --git a/src/features/dashboard/components/SystemOverview.tsx b/src/features/dashboard/components/SystemOverview.tsx index c7aba54..b440e22 100644 --- a/src/features/dashboard/components/SystemOverview.tsx +++ b/src/features/dashboard/components/SystemOverview.tsx @@ -14,7 +14,6 @@ const SystemOverview = () => { const isError = query?.isError; const dateUpdatedAt = query?.dataUpdatedAt; - console.log(query?.dataUpdatedAt); return ( diff --git a/src/features/dashboard/hooks/useGetSystemHealth.ts b/src/features/dashboard/hooks/useGetSystemHealth.ts index d9599d6..afbbc3b 100644 --- a/src/features/dashboard/hooks/useGetSystemHealth.ts +++ b/src/features/dashboard/hooks/useGetSystemHealth.ts @@ -1,7 +1,8 @@ import { useQuery } from "@tanstack/react-query"; +import { CAMBASE } from "../../../utils/config"; const fetchData = async () => { - const response = await fetch(`http://100.115.148.59/api/system-health`); + const response = await fetch(`${CAMBASE}/api/system-health`); if (!response.ok) throw new Error("Cannot get System overview"); return response.json(); }; diff --git a/src/features/output/components/BearerTypeFields.tsx b/src/features/output/components/BearerTypeFields.tsx index dccbd26..6257bc3 100644 --- a/src/features/output/components/BearerTypeFields.tsx +++ b/src/features/output/components/BearerTypeFields.tsx @@ -1,6 +1,8 @@ -import { Field } from "formik"; +import { Field, useFormikContext } from "formik"; +import type { FormTypes } from "../../../types/types"; const BearerTypeFields = () => { + useFormikContext(); return (