Path: blob/master/src/packages/next/pages/support/index.tsx
6016 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/community",77title: "CoCalc Community Support",78logo: "users",79description: (80<>81<A href="https://discord.gg/EugdaJZ8">Join our Discord server</A> or{" "}82<A href="https://groups.google.com/forum/?fromgroups#!forum/cocalc">83post to the mailing list.{" "}84</A>85<SocialMediaIconList86links={{87discord: "https://discord.gg/EugdaJZ8",88facebook: "https://www.facebook.com/CoCalcOnline",89github: "https://github.com/sagemathinc/cocalc",90linkedin: "https://www.linkedin.com/company/sagemath-inc./",91twitter: "https://twitter.com/cocalc_com",92youtube: "https://www.youtube.com/c/SagemathCloud",93}}94iconFontSize={20}95/>96</>97),98},99{100link: "/support/chatgpt",101title: "ChatGPT",102logo: "robot",103hide: (customize) => !customize.openaiEnabled || !customize.onCoCalcCom,104description: (105<>106<ChatGPTHelp107style={{ marginTop: "15px" }}108size="large"109tag="support-index"110/>111</>112),113},114{115landingPages: true,116link: ({ supportVideoCall }: CustomizeType) => supportVideoCall,117title: "Request a Live Demo!",118logo: "video-camera",119hide: ({ supportVideoCall, isCommercial }: CustomizeType) =>120!isCommercial || !supportVideoCall,121description: ({ supportVideoCall }: CustomizeType) => (122<>123If you're seriously considering using CoCalc to teach a course, but124aren't sure of some of the details and really need to just{" "}125<b>talk to a person</b>,{" "}126<A href={supportVideoCall}>127fill out this form and request a live video chat with us128</A>129. We love chatting (in English, German and Russian), and will hopefully130be able to answer all of your questions.131</>132),133},134] as const satisfies DataSource;135136export default function Preferences({ customize }) {137const { support, onCoCalcCom } = customize;138139function renderContent() {140if (!onCoCalcCom && support) {141return (142<Col143xs={{ span: 12, offset: 6 }}144style={{145marginTop: "30px",146marginBottom: "30px",147}}148>149<Title level={2}>Support</Title>150<SanitizedMarkdown value={support} />151</Col>152);153} else {154return (155<IndexList156title="Support"157description={158<>159We provide extremely good support to our users and customers. If160you run into a problem, read{" "}161<A href="https://doc.cocalc.com/">our extensive documentation</A>,{" "}162<A href="/support/community">check online forums and chatrooms</A>{" "}163or <A href="/support/new">create a support ticket</A>.164</>165}166dataSource={dataSource}167/>168);169}170}171172return (173<Customize value={customize}>174<Head title="Support" />175<Layout>176<Header page="support" />177{renderContent()}178<Footer />179</Layout>180</Customize>181);182}183184export async function getServerSideProps(context) {185return await withCustomize({ context });186}187188189