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/404.tsx
Views: 687
/*1* This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import { useEffect, useState } from "react";6import { join } from "path";7import Head from "next/head";8import Footer from "components/landing/footer";9import LandingHeader from "components/landing/header";10import { Layout } from "antd";11import basePath from "lib/base-path";12import { Icon } from "@cocalc/frontend/components/icon";13import { COLORS } from "@cocalc/util/theme";14import apiPost from "lib/api/post";15import { MAX_WIDTH } from "lib/config";1617const favicon = join(basePath, "webapp/favicon-32x32.png");1819export default function Custom404() {20const [siteName, setSiteName] = useState<string>("");21useEffect(() => {22(async () => {23const customize = await apiPost("customize", { fields: ["siteName"] });24setSiteName(customize.siteName);25})();26}, []);2728return (29<>30<Head>31<title>{`${siteName ? siteName + " – " : ""}404 Page Not Found`}</title>32<meta name="description" content="404 Page Not Found" />33<meta name="robots" content="noindex,nofollow" />34<link rel="icon" href={favicon} />35</Head>36<Layout>37<LandingHeader />38<Layout.Content style={{ background: "white" }}>39<div40style={{41color: "#555",42margin: "50px auto",43minHeight: "50vh",44maxWidth: MAX_WIDTH,45fontSize: "150%",46}}47>48<h1>49404 – Page Not Found50<span51style={{52float: "right",53fontSize: "200%",54color: COLORS.ANTD_RED,55}}56>57<Icon name="robot" />58</span>59</h1>6061<div>62<a href={`${basePath}/`}>63Back to {siteName ? `${siteName}'s ` : "the "} main page64</a>65</div>66</div>67</Layout.Content>68<Footer />69</Layout>70</>71);72}737475