Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
1.5 kB ยท 59 lines
TSX
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960"use client";
import type { RouterOutputs } from "@openstatus/api";import type { ColumnDef } from "@tanstack/react-table";
import { DataTableColumnHeader } from "@/components/ui/data-table/data-table-column-header";
import { DataTableRowActions } from "./data-table-row-actions";
type PageComponent = RouterOutputs["pageComponent"]["list"][number];
export const columns: ColumnDef<PageComponent>[] = [ { accessorKey: "name", header: "Name", enableSorting: false, enableHiding: false, }, { accessorKey: "description", header: "Description", enableSorting: false, cell: ({ row }) => { const value = row.getValue("description"); return ( <span className="text-muted-foreground max-w-[200px] truncate"> {value ? String(value) : "-"} </span> ); }, }, { accessorKey: "type", header: ({ column }) => ( <DataTableColumnHeader column={column} title="Type" /> ), cell: ({ row }) => { const value = row.getValue("type"); return <span className="capitalize">{String(value)}</span>; }, }, { accessorKey: "order", header: ({ column }) => ( <DataTableColumnHeader column={column} title="Order" /> ), cell: ({ row }) => { const value = row.getValue("order"); return <span>{value != null ? String(value) : "-"}</span>; }, }, { id: "actions", cell: ({ row }) => <DataTableRowActions row={row} />, meta: { cellClassName: "w-8", }, },];