All files / components/Slack SlackUsersTable.jsx

100% Statements 3/3
100% Branches 1/1
100% Functions 2/2
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35                18x                                       20x       18x    
import React from "react";
import OurTable from "main/components/OurTable";
import { courseRoleLabel } from "main/utils/slackUtils";
 
export default function SlackUsersTable({
  users,
  testIdPrefix = "SlackUsersTable",
}) {
  const columns = [
    {
      header: "Name",
      accessorKey: "realName",
    },
    {
      header: "Display Name",
      accessorKey: "displayName",
    },
    {
      header: "Slack Username",
      accessorKey: "name",
    },
    {
      header: "Email",
      accessorKey: "email",
    },
    {
      header: "Course Role",
      id: "courseRole",
      accessorFn: (row) => courseRoleLabel(row.courseRole),
    },
  ];
 
  return <OurTable data={users} columns={columns} testid={testIdPrefix} />;
}