"use client"; import { ColumnDef } from "@tanstack/react-table"; import { DateWithTime } from "@/components/providers"; import { StatusBadge } from "@/components/ui"; import { UserActions } from "@/components/users"; import { UserProps } from "@/types"; const getUserData = (row: { original: UserProps }) => { return row.original; }; export const ColumnsUser: ColumnDef[] = [ { accessorKey: "email", header: "Email", cell: ({ row }) => { const { email } = getUserData(row); return

{email}

; }, }, { accessorKey: "name", header: "Name", cell: ({ row }) => { const { name } = getUserData(row); return

{name}

; }, }, { accessorKey: "role", header: "Role", cell: ({ row }) => { const { role } = getUserData(row); return

{role}

; }, }, { accessorKey: "added", header: "Added", cell: ({ row }) => { const { dateAdded } = getUserData(row); return ; }, }, { accessorKey: "status", header: "Status", cell: ({ row }) => { const { status } = getUserData(row); return ; }, }, { accessorKey: "actions", header: () =>
Actions
, id: "actions", cell: ({ row }) => { const userData = getUserData(row); return ; }, }, ];