From 83790a4bfce783bbe16e75dbcf5dd27d1269ebff Mon Sep 17 00:00:00 2001 From: rcourtman Date: Fri, 26 Dec 2025 11:06:42 +0000 Subject: [PATCH] fix(frontend): resolve TypeScript errors causing CI failures - Remove unused setUseRelativeTime in UnifiedBackups.tsx (TS6133) - Remove unused testing-library imports in PBSEnhancementBanner.test.ts (TS6133) - Fix type comparison in test by using union type instead of 'as const' (TS2367) --- frontend-modern/src/components/Backups/UnifiedBackups.tsx | 2 +- .../Backups/__tests__/PBSEnhancementBanner.test.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend-modern/src/components/Backups/UnifiedBackups.tsx b/frontend-modern/src/components/Backups/UnifiedBackups.tsx index fff451707..e4b7fce7f 100644 --- a/frontend-modern/src/components/Backups/UnifiedBackups.tsx +++ b/frontend-modern/src/components/Backups/UnifiedBackups.tsx @@ -158,7 +158,7 @@ const UnifiedBackups: Component = () => { } }); - const [useRelativeTime, setUseRelativeTime] = createLocalStorageBooleanSignal( + const [useRelativeTime] = createLocalStorageBooleanSignal( STORAGE_KEYS.BACKUPS_USE_RELATIVE_TIME, false, // Default to absolute time ); diff --git a/frontend-modern/src/components/Backups/__tests__/PBSEnhancementBanner.test.ts b/frontend-modern/src/components/Backups/__tests__/PBSEnhancementBanner.test.ts index 31f39ae06..08f6c6ba3 100644 --- a/frontend-modern/src/components/Backups/__tests__/PBSEnhancementBanner.test.ts +++ b/frontend-modern/src/components/Backups/__tests__/PBSEnhancementBanner.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; -import { render, screen, waitFor, fireEvent, cleanup } from '@solidjs/testing-library'; +import { cleanup } from '@solidjs/testing-library'; import { createStore } from 'solid-js/store'; // We need to test the PBS enhancement banner logic @@ -197,8 +197,8 @@ describe('PBS Backup Data Source Indicator', () => { }); it('should NOT show "via PVE" for non-PBS backups', () => { - const backup = { - backupType: 'local' as const, + const backup: { backupType: 'local' | 'remote'; storage: string; datastore: null } = { + backupType: 'local', storage: 'local-lvm', datastore: null, };