37 lines
795 B
TypeScript
37 lines
795 B
TypeScript
|
"use client"
|
||
|
import { ColumnDef } from "@tanstack/react-table"
|
||
|
import { Story } from "@prisma/client"
|
||
|
import { ArrowUpDown, MoreHorizontal } from "lucide-react"
|
||
|
import { Button } from "@/components/ui/button"
|
||
|
export const columns: ColumnDef<Story>[] = [
|
||
|
// {
|
||
|
// accessorKey: "id",
|
||
|
// header: "Id",
|
||
|
// enableHiding: true,
|
||
|
// },
|
||
|
{
|
||
|
accessorKey: "title",
|
||
|
header: ({ column }) => {
|
||
|
return (
|
||
|
<Button
|
||
|
variant="ghost"
|
||
|
onClick={() => column.toggleSorting(column.getIsSorted() === "asc")}
|
||
|
>
|
||
|
Title
|
||
|
<ArrowUpDown className="ml-2 h-4 w-4" />
|
||
|
</Button>
|
||
|
)
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
accessorKey: "word_count",
|
||
|
header: "Word Count",
|
||
|
},
|
||
|
// {
|
||
|
// accessorKey: "deleted",
|
||
|
// header: "Deleted"
|
||
|
// },
|
||
|
|
||
|
]
|
||
|
|