import { ColumnDef } from "@tanstack/react-table" import { IVideo } from "@/models/IVideo" import AddModal from "./Modals/AddModal" import RemoveModal from "./Modals/RemoveModal" import { format } from 'date-fns' export const VideoColumns: ColumnDef[] = [ { accessorKey: "name", header: "Имя", cell: ({ row }) => (
{row.getValue("name")}
), }, { accessorKey: "playlist", header: "Плейлист", cell: ({ row }) => (
{row.original.playlist?.name}
), }, { accessorKey: "artist", header: "Исполнитель", cell: ({ row }) => (
{row.original.artist?.name}
), }, { accessorKey: "date", header: "Date", cell: ({ row }) => (
{format(new Date(row.getValue("date")), 'dd.mm.yyyy')}
), }, { id: "actions", enableHiding: false, maxSize: 0, cell: ({row}) => { return (
) }, }, ]