diff --git a/frontend/src/components/SystemStatusBadge.tsx b/frontend/src/components/SystemStatusBadge.tsx index 01704a9..48334c6 100644 --- a/frontend/src/components/SystemStatusBadge.tsx +++ b/frontend/src/components/SystemStatusBadge.tsx @@ -2,12 +2,17 @@ import { Activity, WifiOff } from "lucide-react"; import { useEffect, useState } from "react"; import { cn } from "../lib/utils"; -import { getBackendStatus, type BackendHealthResponse } from "../services/statusService"; +import { + getBackendStatus, + type BackendHealthResponse, +} from "../services/statusService"; type LoadState = "loading" | "online" | "offline"; function extractBackendVersion(payload: BackendHealthResponse | null) { - const versionCheck = payload?.checks?.find((check) => check.name === "backend-version"); + const versionCheck = payload?.checks?.find( + (check) => check.name === "backend-version", + ); const version = versionCheck?.data?.version; return typeof version === "string" ? version : "unknown"; @@ -40,7 +45,7 @@ export function SystemStatusBadge() { void loadStatus(); const intervalId = window.setInterval(() => { void loadStatus(); - }, 30000); + }, 60000); return () => { active = false; @@ -70,7 +75,9 @@ export function SystemStatusBadge() { onClick={() => setIsPinnedOpen((current) => !current)} className={cn( "flex h-8 w-8 shrink-0 items-center justify-center rounded-xl transition-transform duration-200 hover:scale-105", - isOnline ? "bg-success-soft text-success" : "bg-danger-soft text-danger", + isOnline + ? "bg-success-soft text-success" + : "bg-danger-soft text-danger", )} > {isOnline ? : } @@ -79,7 +86,9 @@ export function SystemStatusBadge() {
@@ -95,7 +104,11 @@ export function SystemStatusBadge() { backendStatus === "offline" && "bg-danger-soft text-danger", )} > - {backendStatus === "loading" ? "Verificando" : isOnline ? "Online" : "Offline"} + {backendStatus === "loading" + ? "Verificando" + : isOnline + ? "Online" + : "Offline"}