Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/next/pages/testimonials/index.tsx
Views: 687
/*1* This file is part of CoCalc: Copyright © 2023 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import { Button, Layout, Space } from "antd";6import { GetServerSidePropsContext } from "next";7import { join } from "path";89import { Icon } from "@cocalc/frontend/components/icon";10import Footer from "components/landing/footer";11import Head from "components/landing/head";12import Header from "components/landing/header";13import { Paragraph, Title } from "components/misc";14import { TESTIMONIALS, TestimonialComponent } from "components/testimonials";15import basePath from "lib/base-path";16import { MAX_WIDTH } from "lib/config";17import { Customize, CustomizeType } from "lib/customize";18import withCustomize from "lib/with-customize";1920interface Props {21customize: CustomizeType;22}2324export default function AllNews(props: Props) {25const { customize } = props;26const { siteName } = customize;272829function content() {30return (31<>32<Title level={1} style={{ textAlign: "center", margin: "40px 0" }}>33<Icon name="comments" /> {siteName} Testimonials34</Title>35<Space direction="vertical" size="large" style={{ width: "100%" }}>36{TESTIMONIALS.map((testimonial, idx) => (37<TestimonialComponent key={idx} testimonial={testimonial} />38))}39</Space>40<Paragraph style={{ textAlign: "center", margin: "40px 0" }}>41<Button42size="large"43onClick={() => (window.location.href = join(basePath, "/"))}44title={`Open the ${siteName} homepage.`}45type="primary"46>47Home48</Button>49</Paragraph>50</>51);52}5354return (55<Customize value={customize}>56<Head title={`${siteName} Testimonials`} />57<Layout>58<Header />59<Layout.Content style={{ backgroundColor: "white" }}>60<div61style={{62minHeight: "75vh",63maxWidth: MAX_WIDTH,64padding: "30px 15px",65margin: "0 auto",66}}67>68{content()}69</div>70<Footer />71</Layout.Content>72</Layout>73</Customize>74);75}7677export async function getServerSideProps(context: GetServerSidePropsContext) {78return await withCustomize({ context });79}808182