Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/components/store/overview.tsx
1450 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="Licenses" href="/store/site-license">
51
Buy a license to upgrade projects, get internet access, more CPU, disk
52
and memory.
53
</Product>
54
<Product href={"/store/vouchers"} icon="gift" title="Vouchers">
55
Purchase a <A href={"/vouchers"}>voucher code</A> to make <SiteName />{" "}
56
credit easily available to somebody else.
57
</Product>
58
<Divider />
59
<Product
60
href={"/features/compute-server"}
61
icon={PAYASYOUGO_ICON}
62
title="Compute Servers"
63
>
64
Run Jupyter Notebooks and Linux Terminals on GPUs and high-powered CPU
65
machines with full admin privileges. Pay as you go.
66
</Product>
67
<Product href={"/pricing/onprem"} icon="server" title="On-Premises">
68
Self-host <SiteName /> on your own compute resources in order to keep
69
your data on-site.
70
</Product>
71
</OverviewRow>
72
<Paragraph style={{ marginTop: "4em" }}>
73
If you already selected one or more items, view your{" "}
74
<A href="/store/cart">shopping cart</A> or go straight to{" "}
75
<A href="/store/checkout">checkout</A>.
76
</Paragraph>
77
<Paragraph>
78
You can also browse your{" "}
79
<A href="/settings/purchases">purchase history</A>,{" "}
80
<A href="/settings/licenses">licenses</A>, and{" "}
81
<A href="/vouchers/created">vouchers</A>.
82
</Paragraph>
83
</div>
84
);
85
}
86
87
/*
88
<Product icon="rocket" title="License Booster" href="/store/boost">
89
Add additional upgrades to an existing and <em>compatible</em>{" "}
90
license.
91
</Product>
92
<Product
93
href={"/store/dedicated"}
94
icon="save"
95
icon2="dedicated"
96
title="Dedicated Disk/VM"
97
>
98
Attach a large dedicated disk for more storage to your project or run
99
your project on a dedicated Virtual Machine to harness much more CPU
100
and memory.
101
</Product>
102
103
*/
104
105