Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/components/store/overview.tsx
5534 views
1
/*
2
* This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import { Divider } from "antd";
7
import { useRouter } from "next/router";
8
import { useEffect } from "react";
9
10
import { Icon, PAYASYOUGO_ICON } from "@cocalc/frontend/components/icon";
11
import { Paragraph } from "components/misc";
12
import A from "components/misc/A";
13
import SiteName from "components/share/site-name";
14
import { useCustomize } from "lib/customize";
15
import {
16
OVERVIEW_LARGE_ICON,
17
OVERVIEW_STYLE,
18
OverviewRow,
19
Product,
20
} from "lib/styles/layouts";
21
22
export default function Overview() {
23
const router = useRouter();
24
const { supportVideoCall } = useCustomize();
25
26
// most likely, user will go to the cart next
27
useEffect(() => {
28
router.prefetch("/store/site-license");
29
}, []);
30
31
return (
32
<div style={OVERVIEW_STYLE}>
33
<Icon style={OVERVIEW_LARGE_ICON} name="shopping-cart" />
34
<h2 style={{ marginBottom: "30px" }}>
35
Welcome to the <SiteName /> Store!
36
</h2>
37
<Paragraph style={{ fontSize: "13pt" }}>
38
Shop below for <A href="/store/site-license">licenses</A> and{" "}
39
<A href="/store/vouchers">vouchers</A> or explore{" "}
40
<A href="/pricing">all available products and pricing</A>.
41
</Paragraph>
42
{supportVideoCall ? (
43
<Paragraph>
44
Not sure what you need?{" "}
45
<A href={supportVideoCall}>Book a video call</A> and we'll help you
46
decide.
47
</Paragraph>
48
) : undefined}
49
<OverviewRow>
50
<Product icon="key" title="License" href="/store/site-license">
51
Buy a license to upgrade projects, get internet access, more CPU, disk
52
and memory.
53
</Product>
54
<Product icon="graduation-cap" title="Course" href="/store/course">
55
Purchase a license for teaching a course.
56
</Product>
57
<Paragraph style={{ textAlign: "center", width: "100%" }}>
58
<Icon name="gift" /> Purchase a <A href={"/vouchers"}>voucher code</A>{" "}
59
to make <SiteName /> credit easily available to somebody else.
60
</Paragraph>
61
<Divider />
62
<Product
63
href={"/features/compute-server"}
64
icon={PAYASYOUGO_ICON}
65
title="Compute Servers"
66
>
67
Run Jupyter Notebooks and Linux Terminals on GPUs and high-powered CPU
68
machines with full admin privileges. Pay as you go.
69
</Product>
70
<Product href={"/pricing/onprem"} icon="server" title="On-Premises">
71
Self-host <SiteName /> on your own compute resources in order to keep
72
your data on-site.
73
</Product>
74
</OverviewRow>
75
<Paragraph style={{ marginTop: "4em" }}>
76
If you already selected one or more items, view your{" "}
77
<A href="/store/cart">shopping cart</A> or go straight to{" "}
78
<A href="/store/checkout">checkout</A>.
79
</Paragraph>
80
<Paragraph style={{ marginBottom: "4em" }}>
81
You can also browse your{" "}
82
<A href="/settings/purchases">purchase history</A>,{" "}
83
<A href="/settings/licenses">licenses</A>, and{" "}
84
<A href="/vouchers/created">vouchers</A>.
85
</Paragraph>
86
</div>
87
);
88
}
89
90
/*
91
<Product icon="rocket" title="License Booster" href="/store/boost">
92
Add additional upgrades to an existing and <em>compatible</em>{" "}
93
license.
94
</Product>
95
<Product
96
href={"/store/dedicated"}
97
icon="save"
98
icon2="dedicated"
99
title="Dedicated Disk/VM"
100
>
101
Attach a large dedicated disk for more storage to your project or run
102
your project on a dedicated Virtual Machine to harness much more CPU
103
and memory.
104
</Product>
105
106
*/
107
108