"use client"; import { ColumnDef } from "@tanstack/react-table"; import { ResourcesDataTable } from "./ResourcesDataTable"; 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 ResourceRow = { id: string; name: string; orgId: string; domain: string; site: string; }; export const columns: ColumnDef[] = [ { accessorKey: "name", header: ({ column }) => { return ( ); }, }, { accessorKey: "site", header: ({ column }) => { return ( ); }, }, { accessorKey: "domain", header: "Domain", }, { id: "actions", cell: ({ row }) => { const resourceRow = row.original; return ( View settings ); }, }, ]; type ResourcesTableProps = { resources: ResourceRow[]; orgId: string; }; export default function SitesTable({ resources, orgId }: ResourcesTableProps) { const router = useRouter(); return ( { router.push(`/${orgId}/resources/create`); }} /> ); }