feat: show verified/unverified badge on site cards

This commit is contained in:
Usman Baig
2026-03-13 16:32:26 +01:00
parent 66a9ac1f31
commit 8f06c9168a
4 changed files with 26 additions and 8 deletions

View File

@@ -9,7 +9,7 @@ import {
AlertTriangleIcon,
ZapIcon
} from '@ciphera-net/ui'
import { Site } from '@/lib/api/sites'
import { Site, verifySite } from '@/lib/api/sites'
import { getRealtime } from '@/lib/api/stats'
import { toast, Button } from '@ciphera-net/ui'
@@ -56,6 +56,7 @@ export default function VerificationModal({ isOpen, onClose, site }: Verificatio
if (data.visitors > 0) {
setStatus('success')
toast.success('Connection established!')
try { await verifySite(site.id) } catch {}
}
} catch (e) {
// Ignore errors