import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@/components/ui/table"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Button } from "@/components/ui/button"; import { Edit, Trash2, ShieldAlert } from "lucide-react"; import { User } from "@/lib/features/auth/authSlice"; import { getAvatarUrl } from "@/lib/utils"; interface UserTableProps { users: User[]; onEdit: (user: User) => void; onDelete: (id: string) => void; onHardDelete: (id: string) => void; } export function UserTable({ users, onEdit, onDelete, onHardDelete }: UserTableProps) { return (
Avatar Username Email Roller İşlemler {users.length === 0 ? ( Kullanıcı bulunamadı. ) : ( users.map((user) => ( {user.username?.slice(0, 2).toUpperCase() || "?"} {user.username} {user.email} {user.roles?.map((r) => r.name).join(", ") || "-"}
)) )}
); }