"use client"; import { FC } from "react"; import { GridColDef } from "@mui/x-data-grid-pro"; import { useRouter } from "next/navigation"; import { List as InternalList, Button } from "ui"; import type { Selectable } from "kysely"; import { Database } from "@/app/_lib/database"; interface ListProps { title: string; entity: string; rows: Selectable[]; columns: GridColDef[]; } export const List: FC = ({ title, entity, rows, columns }) => { const router = useRouter(); const onRowClick = (id: string) => { router.push(`/${entity}/${id}`); }; return ( } /> ); };