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/proxy/organization.tsx
Views: 687
1
/*
2
* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import { Customize } from "lib/share/customize";
7
import { Layout } from "components/share/layout";
8
import A from "components/misc/A";
9
import DirectoryListing from "components/share/directory-listing";
10
import { Alert } from "antd";
11
import { capitalize } from "@cocalc/util/misc";
12
import SiteName from "components/share/site-name";
13
import Avatar from "./avatar";
14
15
interface Props {
16
organization: string;
17
customize;
18
contents;
19
error?: string;
20
}
21
22
export default function Organization({
23
customize,
24
contents,
25
error,
26
organization,
27
}: Props) {
28
return (
29
<Customize value={customize}>
30
<Layout title={`GitHub - ${organization}`}>
31
<Avatar name={organization} style={{ float: "right" }}/>
32
<h1>{capitalize(organization)}'s GitHub Repositories</h1>
33
These are the{" "}
34
<A href={`https://github.com/${organization}`}>
35
GitHub repositories that are owned by {organization}
36
</A>
37
. You can browse and work with them via <SiteName />.
38
<br />
39
<br />
40
{error && <Alert type="error" message={error} showIcon />}
41
{contents?.listing && <DirectoryListing listing={contents.listing} />}
42
</Layout>
43
</Customize>
44
);
45
}
46
47