Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/components/landing/live-demo.tsx
1450 views
1
import { Button } from "antd";
2
import type { ButtonType } from "antd/es/button";
3
import type { ReactNode } from "react";
4
5
import { Icon } from "@cocalc/frontend/components/icon";
6
import getSupportUrl from "@cocalc/frontend/support/url";
7
import { useCustomize } from "lib/customize";
8
9
export function liveDemoUrl(context) {
10
return getSupportUrl({
11
subject: "Contact Us!",
12
type: "chat",
13
context,
14
url: "",
15
});
16
}
17
18
interface Props {
19
context: string;
20
label?: string | ReactNode;
21
btnType?: ButtonType;
22
}
23
24
export default function LiveDemo({ label, btnType }: Props) {
25
const { supportVideoCall } = useCustomize();
26
27
if (!supportVideoCall) {
28
return null;
29
}
30
31
return (
32
<Button href={supportVideoCall} type={btnType}>
33
<Icon name="video-camera" /> {label ?? "Book a Demo!"}
34
</Button>
35
);
36
}
37
38