fix(lint): remove unused imports and variables from redesign

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jason Staack
2026-03-21 16:05:31 -05:00
parent 106aa0f708
commit dbc8c45914
7 changed files with 2 additions and 29 deletions

View File

@@ -1,7 +1,6 @@
import { useState } from 'react'
import { useQuery } from '@tanstack/react-query'
import { Bell, Server, HardDrive } from 'lucide-react'
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
import { cn } from '@/lib/utils'
import { eventsApi, type DashboardEvent, type EventsParams } from '@/lib/eventsApi'
import { DeviceLink } from '@/components/ui/device-link'

View File

@@ -1,5 +1,3 @@
import { Server, Wifi, AlertTriangle, Activity } from 'lucide-react'
import { Card, CardContent } from '@/components/ui/card'
import { useAnimatedCounter } from '@/hooks/useAnimatedCounter'
import { cn } from '@/lib/utils'
@@ -23,7 +21,6 @@ export function formatBandwidth(bps: number): { value: number; unit: string } {
}
interface KpiCardProps {
icon: React.ReactNode
label: string
value: number
suffix?: string
@@ -33,7 +30,6 @@ interface KpiCardProps {
}
function KpiCard({
icon,
label,
value,
suffix,
@@ -85,13 +81,11 @@ export function KpiCards({
return (
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
<KpiCard
icon={<Server className="h-5 w-5" />}
label="Total Devices"
value={totalDevices}
colorClass="text-accent"
/>
<KpiCard
icon={<Wifi className="h-5 w-5" />}
label="Online"
value={onlinePercent}
suffix="%"
@@ -99,14 +93,12 @@ export function KpiCards({
colorClass="text-success"
/>
<KpiCard
icon={<AlertTriangle className="h-5 w-5" />}
label="Active Alerts"
value={activeAlerts}
colorClass={activeAlerts > 0 ? 'text-warning' : 'text-text-muted'}
highlight={activeAlerts > 0}
/>
<KpiCard
icon={<Activity className="h-5 w-5" />}
label="Total Bandwidth"
value={bandwidth.value}
suffix={bandwidth.unit}

View File

@@ -7,7 +7,6 @@ import {
Bell,
Map,
} from 'lucide-react'
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
import { cn } from '@/lib/utils'
export interface QuickActionsProps {

View File

@@ -208,9 +208,6 @@ export function FleetDashboard() {
() => fleetDevices?.filter((d) => d.status === 'online') ?? [],
[fleetDevices],
)
const onlinePercent =
totalDevices > 0 ? (onlineDevices.length / totalDevices) * 100 : 0
const degradedCount = useMemo(
() => fleetDevices?.filter((d) => d.status === 'degraded').length ?? 0,
[fleetDevices],
@@ -255,12 +252,6 @@ export function FleetDashboard() {
}))
}, [fleetDevices])
// Total "bandwidth" (sum of CPU loads scaled)
const totalBandwidthBps = useMemo(
() => topConsumers.reduce((sum, d) => sum + d.bandwidthBps, 0),
[topConsumers],
)
// Last updated timestamp
const lastUpdated = dataUpdatedAt
? new Date(dataUpdatedAt).toLocaleTimeString('en-US', {

View File

@@ -4,7 +4,6 @@
*/
import { LayoutGrid, Sliders } from 'lucide-react'
import { Button } from '@/components/ui/button'
import { cn } from '@/lib/utils'
interface SimpleModeToggleProps {

View File

@@ -1,7 +1,5 @@
import { cn } from '@/lib/utils'
// Compatibility shim — returns null. Remove once all imports are cleaned up.
export function Skeleton({ className: _className }: { className?: string }) {
export function Skeleton() {
return null
}

View File

@@ -17,7 +17,7 @@ import {
ShieldOff,
Shield,
} from 'lucide-react'
import { devicesApi, deviceGroupsApi, deviceTagsApi, tenantsApi, configApi, sitesApi, type DeviceResponse, type DeviceUpdate } from '@/lib/api'
import { devicesApi, deviceGroupsApi, deviceTagsApi, configApi, sitesApi, type DeviceResponse, type DeviceUpdate } from '@/lib/api'
import { alertsApi } from '@/lib/alertsApi'
import { useAuth, canWrite, canDelete } from '@/lib/auth'
import { toast } from '@/components/ui/toast'
@@ -315,11 +315,6 @@ function DeviceDetailPage() {
queryFn: () => devicesApi.get(tenantId, deviceId),
})
const { data: tenant } = useQuery({
queryKey: ['tenants', tenantId],
queryFn: () => tenantsApi.get(tenantId),
})
const { data: backups } = useQuery({
queryKey: ['config-backups', tenantId, deviceId],
queryFn: () => configApi.listBackups(tenantId, deviceId),