();
const dashboardColumns = [
columnHelper.accessor("name", {
header: "Name",
id: "name",
enableSorting: true,
size: 200,
cell: (row) => {
const name = row.getValue();
return name ? (
) : undefined;
},
}),
columnHelper.accessor("description", {
header: "Description",
id: "description",
size: 300,
cell: (row) => {
return row.getValue();
},
}),
columnHelper.display({
id: "ownerTag",
header: "Owner",
size: 80,
cell: (row) => {
return row.row.original.owner === "LANGFUSE" ? (
🪢
Langfuse
) : (
Project
);
},
}),
columnHelper.accessor("createdAt", {
header: "Created At",
id: "createdAt",
enableSorting: true,
size: 150,
cell: (row) => {
const createdAt = row.getValue();
return ;
},
}),
columnHelper.accessor("updatedAt", {
header: "Updated At",
id: "updatedAt",
enableSorting: true,
size: 150,
cell: (row) => {
const updatedAt = row.getValue();
return ;
},
}),
columnHelper.display({
id: "actions",
header: "Actions",
size: 70,
cell: (row) => {
const id = row.row.original.id;
const name = row.row.original.name;
const description = row.row.original.description;
const owner = row.row.original.owner;
return (
e.stopPropagation()}>
{owner === "PROJECT" && (
)}
{owner === "PROJECT" && (
)}
);
},
}),
] as LangfuseColumnDef[];
return (
{
router.push(
`/project/${projectId}/dashboards/${encodeURIComponent(row.id)}`,
);
}}
/>
);
}