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