fix: remove unused TS imports, fix icon size type, use prisma db push

This commit is contained in:
NixReaper
2026-04-05 12:03:33 -05:00
parent 5f42fe1ef0
commit f369732f6f
12 changed files with 20 additions and 23 deletions
+2 -5
View File
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react'
import { Shield, Plus, Trash2, CheckCircle } from 'lucide-react'
import { Plus, Trash2, CheckCircle } from 'lucide-react'
import { api } from '../api/client'
interface BlockedIp { id: number; ip: string; reason: string | null; createdAt: string }
@@ -16,10 +16,7 @@ export default function Security() {
const [events, setEvents] = useState<SecurityEvent[]>([])
const [newIp, setNewIp] = useState('')
const [reason, setReason] = useState('')
const [loading, setLoading] = useState(false)
const fetch = async () => {
setLoading(true)
try {
const [b, e] = await Promise.all([
api.get('/nixserver/security/blocked-ips'),
@@ -27,7 +24,7 @@ export default function Security() {
])
setBlocked(b.data.data)
setEvents(e.data.data.items ?? e.data.data)
} finally { setLoading(false) }
} catch {}
}
useEffect(() => { fetch() }, [])