From 3da6de93111057a5e8b581c180bb3650f5dfb5b9 Mon Sep 17 00:00:00 2001 From: Denozordec Date: Thu, 20 Aug 2026 01:49:42 +0700 Subject: [PATCH] =?UTF-8?q?fix(health):=20=D1=81=D1=83=D0=B7=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20=D1=82=D0=B8=D0=BF=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BA?= =?UTF-8?q?=D0=BB=D1=8E=D1=87=D0=B0=D1=82=D0=B5=D0=BB=D1=8F=20=D0=B8=D1=81?= =?UTF-8?q?=D1=82=D0=BE=D1=87=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20tsc=20-b?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ALL_TAB как литерал 'all', чтобы SourceTab не попадал в HealthCheckProvider[]. Co-authored-by: Cursor --- .../web/src/components/reui-kit/service-health-monitor.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/web/src/components/reui-kit/service-health-monitor.tsx b/apps/web/src/components/reui-kit/service-health-monitor.tsx index abc2079..e3a6c5e 100644 --- a/apps/web/src/components/reui-kit/service-health-monitor.tsx +++ b/apps/web/src/components/reui-kit/service-health-monitor.tsx @@ -30,9 +30,8 @@ import { import { cn } from '@cfdm/ui/lib/utils' import type { HealthCheckProvider } from '@cfdm/shared' -type SourceTab = 'all' | HealthCheckProvider - -const ALL_TAB: SourceTab = 'all' +const ALL_TAB = 'all' as const +type SourceTab = typeof ALL_TAB | HealthCheckProvider function formatUptime(value: number | null): string { if (value == null) return '—' @@ -83,7 +82,7 @@ export function ServiceHealthMonitor({ [enabledProviders], ) - const selectedProviders = useMemo(() => { + const selectedProviders = useMemo((): HealthCheckProvider[] => { if (source === ALL_TAB) return [...enabledProviders] if (enabledProviders.includes(source)) return [source] return [...enabledProviders]