Path: blob/master/src/packages/next/lib/share/customize.tsx
1449 views
/*1* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45export { useCustomize } from "lib/customize";6import { Customize as CustomizeContext, CustomizeType } from "lib/customize";7import Link from "next/link";89export function Customize({10value,11children,12}: {13value: CustomizeType;14children;15}) {16if (!value.shareServer) {17return <ShareServerIsDisabled value={value} />;18}19return <CustomizeContext value={value}>{children}</CustomizeContext>;20}2122function ShareServerIsDisabled({ value }: { value: CustomizeType }) {23const { siteName, helpEmail } = value;24return (25<div style={{ margin: "30px", fontSize: "12pt" }}>26<h1>27Browsing of publicly shared paths is currently disabled on{" "}28<Link href="/">{siteName ?? "this server"}</Link>.29</h1>30<br />31{helpEmail && (32<div>33Contact <a href={`mailto:${helpEmail}`}>{helpEmail}</a> for help.34</div>35)}36</div>37);38}394041