CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/components/share/collaborators.tsx
Views: 687
1
import User from "./user";
2
import { ProjectCollaborator } from "lib/api/schema/projects/collaborators/list";
3
4
export default function Collaborators({
5
collaborators,
6
}: {
7
collaborators: ProjectCollaborator[];
8
}) {
9
const v: JSX.Element[] = [];
10
for (const user of collaborators ?? []) {
11
v.push(<User key={user.account_id} {...user} />);
12
v.push(<span key={user.account_id + ","}>{", "}&nbsp;&nbsp;</span>);
13
}
14
v.pop(); // discard last comma.
15
return <>{v}</>;
16
}
17
18