"use client"; import { ColumnDef } from "@tanstack/react-table"; import { DataTable } from "./DataTable"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "@app/components/ui/dropdown-menu"; import { Button } from "@app/components/ui/button"; import { ArrowUpDown, MoreHorizontal } from "lucide-react"; import Link from "next/link"; import { useRouter } from "next/navigation"; export type SiteRow = { id: string; name: string; mbIn: number; mbOut: number; orgId: string; }; export const columns: ColumnDef[] = [ { accessorKey: "id", header: ({ column }) => { return ( ); }, }, { accessorKey: "name", header: ({ column }) => { return ( ); }, }, { accessorKey: "mbIn", header: "MB In", }, { accessorKey: "mbOut", header: "MB Out", }, { id: "actions", cell: ({ row }) => { const siteRow = row.original; return ( View settings ); }, }, ]; type SitesTableProps = { sites: SiteRow[]; orgId: string; }; export default function SitesTable({ sites, orgId }: SitesTableProps) { const router = useRouter(); return ( { router.push(`/${orgId}/sites/create`); }} /> ); }