mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-15 05:45:20 +00:00
27 lines
627 B
TypeScript
27 lines
627 B
TypeScript
|
|
'use client'
|
||
|
|
|
||
|
|
import { Column, ColumnDef } from "@tanstack/react-table"
|
||
|
|
|
||
|
|
export type MemberColumnInfo = {
|
||
|
|
name: string;
|
||
|
|
role: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
export const memberTableColumns = (): ColumnDef<MemberColumnInfo>[] => {
|
||
|
|
return [
|
||
|
|
{
|
||
|
|
accessorKey: "name",
|
||
|
|
cell: ({ row }) => {
|
||
|
|
const member = row.original;
|
||
|
|
return <div>{member.name}</div>;
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
accessorKey: "role",
|
||
|
|
cell: ({ row }) => {
|
||
|
|
const member = row.original;
|
||
|
|
return <div>{member.role}</div>;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|