'use client'; import { Users, UserPlus, Sparkles } from 'lucide-react'; import { Button } from '@/components/ui/button'; import type { User as UserType } from '@/types/user'; import { UserCard } from './UserCard'; interface UsersGridProps { users: UserType[]; loading: boolean; error: any; onViewDetails: (user: UserType) => void; } export function UsersGrid({ users, loading, error, onViewDetails }: UsersGridProps) { if (loading) { return ; } if (error) { return ; } if (users.length === 0) { return ; } return (
{users.map((user, index) => ( ))}
); } function LoadingState() { return (
{[...Array(8)].map((_, i) => (
))}
); } function ErrorState() { return (

Error al cargar usuarios

No se pudieron cargar los usuarios. Verifica tu conexión e intenta nuevamente.

); } function EmptyState() { return (

No hay usuarios

Aún no hay usuarios registrados en el sistema. Los usuarios aparecerán aquí cuando se registren.

); }