this repo has no description
hallaine.com
1"use client";
2
3import type { ColumnDef } from "@tanstack/react-table";
4import Link from "next/link";
5import { DataTableColumnHeader } from "@/components/ui/data-table-column-header";
6import type { getPostBySlug } from "@/lib/content";
7
8type Post = Awaited<ReturnType<typeof getPostBySlug>>;
9
10export const columns: ColumnDef<Post>[] = [
11 {
12 accessorKey: "title",
13 header: "Title",
14 cell: ({ row }) => (
15 <Link href={`/${row.original.slug}`}>{row.getValue("title")}</Link>
16 ),
17 },
18 {
19 accessorKey: "publishedAt",
20 header: ({ column }) => (
21 <DataTableColumnHeader column={column} title="Published At" />
22 ),
23 },
24];