Skip to content

Commit

Permalink
Streamline TeamColumns
Browse files Browse the repository at this point in the history
  • Loading branch information
chartgerink committed Nov 22, 2024
1 parent f716e07 commit c893a64
Showing 1 changed file with 5 additions and 26 deletions.
31 changes: 5 additions & 26 deletions src/teams/tables/columns/PmTeamColumns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,13 @@ import { createColumnHelper } from "@tanstack/react-table"
import Link from "next/link"
import { Routes } from "@blitzjs/next"
import { TeamData } from "../processing/processTeam"
import { ContributorTeamColumns } from "./ContributorTeamColumns"

// Column helper
const columnHelper = createColumnHelper<TeamData>()

// ColumnDefs
export const PmTeamColumns = [
columnHelper.accessor("name", {
cell: (info) => <span>{info.getValue()}</span>,
header: "Team Name",
}),
columnHelper.accessor("id", {
id: "view",
header: "View",
enableColumnFilter: false,
enableSorting: false,
cell: (info) => (
<div className="">
<Link
className="btn btn-primary"
href={Routes.ShowTeamPage({
projectId: info.row.original.projectId!,
teamId: info.getValue(),
})}
>
See Contributions
</Link>
</div>
),
}),
ContributorTeamColumns.push(
columnHelper.accessor("id", {
id: "edit",
header: "Edit",
Expand All @@ -50,5 +28,6 @@ export const PmTeamColumns = [
</Link>
</div>
),
}),
]
})
)
export const PmTeamColumns = ContributorTeamColumns

0 comments on commit c893a64

Please sign in to comment.