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/frontend/customize/terms-of-service.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 { useTypedRedux } from "../app-framework";
7
import { A } from "../components";
8
9
export const TermsOfService: React.FC<{ style?: React.CSSProperties }> = ({
10
style,
11
}) => {
12
const terms_of_service = useTypedRedux("customize", "terms_of_service");
13
const terms_of_service_url = useTypedRedux("customize", "terms_of_service_url");
14
if (terms_of_service?.length > 0) {
15
return (
16
<div
17
style={style}
18
dangerouslySetInnerHTML={{ __html: terms_of_service }}
19
></div>
20
);
21
} else if (terms_of_service_url?.length > 0) {
22
// only used in the context of signing up, hence that phrase...
23
return (
24
<div style={style}>
25
I agree to the <A href={terms_of_service_url}>Terms of Service</A>.
26
</div>
27
);
28
} else {
29
return <></>;
30
}
31
};
32
33