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/landing/contact.tsx
Views: 687
1
/*
2
* This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import A from "components/misc/A";
7
import { useCustomize } from "lib/customize";
8
9
export default function Contact({
10
lower,
11
showEmail = true,
12
useHelpEmail = false,
13
}: {
14
lower?: boolean;
15
showEmail?: boolean;
16
useHelpEmail?: boolean;
17
}) {
18
const { contactEmail, helpEmail } = useCustomize();
19
20
const email = useHelpEmail ? helpEmail : contactEmail;
21
22
if (!email)
23
return <span>{lower ? "c" : "C"}ontact your site administrator</span>;
24
return (
25
<A href={"mailto:" + email}>
26
{lower ? "c" : "C"}ontact {showEmail ? email : ""}
27
</A>
28
);
29
}
30
31