'use client'
import Link from 'next/link'
import { Site } from '@/lib/api/sites'
import { BarChartIcon, SettingsIcon, BookOpenIcon, ExternalLinkIcon } from '@ciphera-net/ui'
import { useAuth } from '@/lib/auth/context'
interface SiteListProps {
sites: Site[]
loading: boolean
onDelete: (id: string) => void
}
export default function SiteList({ sites, loading, onDelete }: SiteListProps) {
const { user } = useAuth()
if (loading) {
return (
{[1, 2, 3].map((i) => (
))}
)
}
if (sites.length === 0) {
return (
No sites yet
Create your first site to get started.
)
}
return (
{sites.map((site) => (
{/* Header: Icon + Name + Live Status */}
{/* Auto-fetch favicon */}
{/* "Live" Indicator */}
Active
{/* Mini Stats Grid */}
{/* Actions */}
View Dashboard
{(user?.role === 'owner' || user?.role === 'admin') && (
)}
))}
{/* Resources Card */}
Need help setup?
Check our documentation for installation guides.
Read Documentation →
)
}