From 8c64cd5d933814312f06547236880eb784454ef1 Mon Sep 17 00:00:00 2001 From: NixReaper Date: Sun, 5 Apr 2026 12:07:25 -0500 Subject: [PATCH] fix: remove unused TS imports and fix icon size type in nixclient --- nixclient/src/components/Layout.tsx | 2 +- nixclient/src/pages/CronJobs.tsx | 2 +- nixclient/src/pages/FileManager.tsx | 2 +- nixclient/src/pages/Overview.tsx | 4 ++-- nixclient/src/pages/SSL.tsx | 2 +- nixclient/src/pages/Stats.tsx | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/nixclient/src/components/Layout.tsx b/nixclient/src/components/Layout.tsx index b77c91f..1c4a890 100644 --- a/nixclient/src/components/Layout.tsx +++ b/nixclient/src/components/Layout.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react' +import { useState } from 'react' import { Outlet, NavLink, useNavigate } from 'react-router-dom' import { LayoutDashboard, FolderOpen, Database, Mail, Lock, diff --git a/nixclient/src/pages/CronJobs.tsx b/nixclient/src/pages/CronJobs.tsx index 7ff736e..7cb9e93 100644 --- a/nixclient/src/pages/CronJobs.tsx +++ b/nixclient/src/pages/CronJobs.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react' -import { Clock, Plus, Trash2, RefreshCw, ToggleLeft, ToggleRight } from 'lucide-react' +import { Plus, Trash2, RefreshCw, ToggleLeft, ToggleRight } from 'lucide-react' import { api } from '../api/client' interface CronJob { id: number; schedule: string; command: string; comment: string | null; enabled: boolean } diff --git a/nixclient/src/pages/FileManager.tsx b/nixclient/src/pages/FileManager.tsx index 1394730..c77f961 100644 --- a/nixclient/src/pages/FileManager.tsx +++ b/nixclient/src/pages/FileManager.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react' -import { Folder, FileText, ChevronRight, Trash2, Pencil, Plus, Upload, RefreshCw, FolderPlus, Save, X } from 'lucide-react' +import { Folder, FileText, ChevronRight, Trash2, Pencil, RefreshCw, FolderPlus, Save, X } from 'lucide-react' import { api } from '../api/client' interface FileEntry { name: string; type: 'file' | 'directory'; size: number; mtime: string; path: string } diff --git a/nixclient/src/pages/Overview.tsx b/nixclient/src/pages/Overview.tsx index 60d0144..467d27b 100644 --- a/nixclient/src/pages/Overview.tsx +++ b/nixclient/src/pages/Overview.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react' -import { Database, Mail, Globe, FolderOpen, Lock, Anchor, Clock, HardDrive } from 'lucide-react' +import { Database, Mail, Globe, Lock, Anchor, Clock } from 'lucide-react' import { api } from '../api/client' import { useAuth } from '../contexts/AuthContext' @@ -34,7 +34,7 @@ function UsageBar({ used, limit, label }: { used: number; limit: number; label: ) } -function CountCard({ icon: Icon, label, used, limit, to }: { icon: React.ComponentType<{ size?: number; className?: string }>; label: string; used: number; limit: number; to: string }) { +function CountCard({ icon: Icon, label, used, limit, to }: { icon: React.ComponentType<{ size?: number | string; className?: string }>; label: string; used: number; limit: number; to: string }) { return (
diff --git a/nixclient/src/pages/SSL.tsx b/nixclient/src/pages/SSL.tsx index 664ef35..0223c1e 100644 --- a/nixclient/src/pages/SSL.tsx +++ b/nixclient/src/pages/SSL.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from 'react' +import { useEffect, useState } from 'react' import { Lock, RefreshCw, RotateCcw } from 'lucide-react' import { api } from '../api/client' diff --git a/nixclient/src/pages/Stats.tsx b/nixclient/src/pages/Stats.tsx index 2b991eb..4bf9abc 100644 --- a/nixclient/src/pages/Stats.tsx +++ b/nixclient/src/pages/Stats.tsx @@ -8,7 +8,7 @@ interface Stats { counts: Record } -function Bar({ label, used, limit, icon: Icon }: { label: string; used: number; limit: number; icon: React.ComponentType<{ size?: number; className?: string }> }) { +function Bar({ label, used, limit, icon: Icon }: { label: string; used: number; limit: number; icon: React.ComponentType<{ size?: number | string; className?: string }> }) { const pct = limit === 0 ? 0 : Math.min(100, Math.round((used / limit) * 100)) const color = pct > 90 ? 'bg-red-500' : pct > 70 ? 'bg-amber-500' : 'bg-sky-500' return (