Path: blob/master/src/packages/next/components/landing/live-demo.tsx
1450 views
import { Button } from "antd";1import type { ButtonType } from "antd/es/button";2import type { ReactNode } from "react";34import { Icon } from "@cocalc/frontend/components/icon";5import getSupportUrl from "@cocalc/frontend/support/url";6import { useCustomize } from "lib/customize";78export function liveDemoUrl(context) {9return getSupportUrl({10subject: "Contact Us!",11type: "chat",12context,13url: "",14});15}1617interface Props {18context: string;19label?: string | ReactNode;20btnType?: ButtonType;21}2223export default function LiveDemo({ label, btnType }: Props) {24const { supportVideoCall } = useCustomize();2526if (!supportVideoCall) {27return null;28}2930return (31<Button href={supportVideoCall} type={btnType}>32<Icon name="video-camera" /> {label ?? "Book a Demo!"}33</Button>34);35}363738