Path: blob/master/src/packages/next/pages/support/index.tsx
1449 views
import { Col, Layout } from "antd";12import Footer from "components/landing/footer";3import Head from "components/landing/head";4import Header from "components/landing/header";5import IndexList, { DataSource } from "components/landing/index-list";6import SocialMediaIconList from "components/landing/social-media-icon-list";7import { Title } from "components/misc";8import A from "components/misc/A";9import SanitizedMarkdown from "components/misc/sanitized-markdown";10import ChatGPTHelp from "components/openai/chatgpt-help";11import { VideoItem } from "components/videos";12import { Customize, type CustomizeType } from "lib/customize";13import withCustomize from "lib/with-customize";1415const dataSource = [16{17link: "/support/new",18title: "Create a New Support Ticket",19logo: "medkit",20hide: (customize) => !customize.zendesk,21description: ({ supportVideoCall }: CustomizeType) => (22<>23If you are having any trouble or just have a question,{" "}24<A href="/support/new">25<b>create a support ticket</b>{" "}26</A>27{supportVideoCall ? (28<>29or{" "}30<A href={supportVideoCall}>31<b>book a video chat</b>32</A>33</>34) : (35""36)}37. You do NOT have to be a paying customer to contact us!38<VideoItem39width={800}40style={{ margin: "15px 0" }}41id={"4Ef9sxX59XM"}42/>43</>44),45},46{47link: "/support/tickets",48title: "Status of Support Tickets",49logo: "life-saver",50hide: (customize) => !customize.zendesk,51description: (52<>53Check on the{" "}54<A href="/support/tickets">55<b>status of your support tickets</b>56</A>57.58</>59),60},61{62link: ({ supportVideoCall }: CustomizeType) => supportVideoCall,63title: "Book a Video Chat",64logo: "video-camera",65description: ({ supportVideoCall }: CustomizeType) => (66<>67Book a{" "}68<A href={supportVideoCall}>69<b>video chat</b>70</A>71.72</>73),74},75{76link: "/support/chatgpt",77title: "ChatGPT Suppport",78logo: "robot",79hide: (customize) => !customize.openaiEnabled || !customize.onCoCalcCom,80description: (81<>82Our <A href="/support/chatgpt">integrated ChatGPT support</A> is free83and often very helpful since it knows so much about the open source84software in CoCalc.85<ChatGPTHelp86style={{ marginTop: "15px" }}87size="large"88tag="support-index"89/>90</>91),92},93{94link: "/support/community",95title: "CoCalc Community Support",96logo: "users",97description: (98<>99<A href="https://github.com/sagemathinc/cocalc/discussions">100Join a discussion101</A>{" "}102or{" "}103<A href="https://groups.google.com/forum/?fromgroups#!forum/cocalc">104post to the mailing list.{" "}105</A>106<SocialMediaIconList107links={{108facebook: "https://www.facebook.com/CoCalcOnline",109github: "https://github.com/sagemathinc/cocalc",110linkedin: "https://www.linkedin.com/company/sagemath-inc./",111twitter: "https://twitter.com/cocalc_com",112youtube: "https://www.youtube.com/c/SagemathCloud",113}}114iconFontSize={20}115/>116</>117),118},119{120landingPages: true,121link: ({ supportVideoCall }: CustomizeType) => supportVideoCall,122title: "Request a Live Demo!",123logo: "video-camera",124hide: ({ supportVideoCall, isCommercial }: CustomizeType) =>125!isCommercial || !supportVideoCall,126description: ({ supportVideoCall }: CustomizeType) => (127<>128If you're seriously considering using CoCalc to teach a course, but129aren't sure of some of the details and really need to just{" "}130<b>talk to a person</b>,{" "}131<A href={supportVideoCall}>132fill out this form and request a live video chat with us133</A>134. We love chatting (in English, German and Russian), and will hopefully135be able to answer all of your questions.136</>137),138},139] as const satisfies DataSource;140141export default function Preferences({ customize }) {142const { support, onCoCalcCom } = customize;143144function renderContent() {145if (!onCoCalcCom && support) {146return (147<Col148xs={{ span: 12, offset: 6 }}149style={{150marginTop: "30px",151marginBottom: "30px",152}}153>154<Title level={2}>Support</Title>155<SanitizedMarkdown value={support} />156</Col>157);158} else {159return (160<IndexList161title="Support"162description={163<>164We provide extremely good support to our users and customers. If165you run into a problem, read{" "}166<A href="https://doc.cocalc.com/">our extensive documentation</A>,{" "}167<A href="/support/community">check online forums and chatrooms</A>{" "}168or <A href="/support/new">create a support ticket</A>.169</>170}171dataSource={dataSource}172/>173);174}175}176177return (178<Customize value={customize}>179<Head title="Support" />180<Layout>181<Header page="support" />182{renderContent()}183<Footer />184</Layout>185</Customize>186);187}188189export async function getServerSideProps(context) {190return await withCustomize({ context });191}192193194