2023-02-16 22:39:57 +00:00
|
|
|
import type { GetStaticPropsContext } from "next";
|
2021-09-22 19:52:38 +00:00
|
|
|
import Link from "next/link";
|
2021-08-08 15:13:31 +00:00
|
|
|
import { useRouter } from "next/router";
|
2022-11-30 21:52:56 +00:00
|
|
|
import { useEffect, useState } from "react";
|
2021-09-22 19:52:38 +00:00
|
|
|
|
2023-06-23 20:01:54 +00:00
|
|
|
import { orgDomainConfig, subdomainSuffix } from "@calcom/features/ee/organizations/lib/orgDomains";
|
2023-07-10 14:10:30 +00:00
|
|
|
import { DOCS_URL, JOIN_DISCORD, WEBSITE_URL, IS_CALCOM } from "@calcom/lib/constants";
|
2023-02-14 15:01:34 +00:00
|
|
|
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
2023-01-23 23:08:01 +00:00
|
|
|
import { HeadSeo } from "@calcom/ui";
|
2023-07-04 22:11:10 +00:00
|
|
|
import { BookOpen, Check, ChevronRight, FileText, Shield } from "@calcom/ui/components/icon";
|
2022-07-01 17:19:52 +00:00
|
|
|
|
2023-04-18 18:45:32 +00:00
|
|
|
import PageWrapper from "@components/PageWrapper";
|
|
|
|
|
2021-12-14 12:31:54 +00:00
|
|
|
import { ssgInit } from "@server/lib/ssg";
|
|
|
|
|
2023-06-23 20:01:54 +00:00
|
|
|
enum pageType {
|
|
|
|
ORG = "org",
|
|
|
|
TEAM = "team",
|
|
|
|
USER = "user",
|
|
|
|
OTHER = "other",
|
|
|
|
}
|
|
|
|
|
2021-08-08 15:13:31 +00:00
|
|
|
export default function Custom404() {
|
2021-10-14 14:24:21 +00:00
|
|
|
const { t } = useLocale();
|
2022-02-11 12:44:25 +00:00
|
|
|
|
2021-08-08 15:13:31 +00:00
|
|
|
const router = useRouter();
|
2023-06-23 20:01:54 +00:00
|
|
|
const [username, setUsername] = useState<string>("");
|
|
|
|
const [currentPageType, setCurrentPageType] = useState<pageType>(pageType.USER);
|
2022-02-11 12:44:25 +00:00
|
|
|
|
2021-10-14 14:24:21 +00:00
|
|
|
const links = [
|
2023-06-23 20:01:54 +00:00
|
|
|
{
|
|
|
|
title: "Enterprise",
|
|
|
|
description: "Learn more about organizations and subdomains in our enterprise plan.",
|
|
|
|
icon: Shield,
|
|
|
|
href: `${WEBSITE_URL}/enterprise`,
|
|
|
|
},
|
2021-10-14 14:24:21 +00:00
|
|
|
{
|
|
|
|
title: t("documentation"),
|
|
|
|
description: t("documentation_description"),
|
2023-04-12 15:26:31 +00:00
|
|
|
icon: FileText,
|
2022-07-01 17:19:52 +00:00
|
|
|
href: DOCS_URL,
|
2021-10-14 14:24:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: t("blog"),
|
|
|
|
description: t("blog_description"),
|
2023-04-12 15:26:31 +00:00
|
|
|
icon: BookOpen,
|
2022-07-01 17:19:52 +00:00
|
|
|
href: `${WEBSITE_URL}/blog`,
|
2021-10-14 14:24:21 +00:00
|
|
|
},
|
|
|
|
];
|
2021-08-08 15:13:31 +00:00
|
|
|
|
2023-06-23 20:01:54 +00:00
|
|
|
const [url, setUrl] = useState(`${WEBSITE_URL}/signup`);
|
2022-02-11 12:44:25 +00:00
|
|
|
useEffect(() => {
|
2023-06-23 20:01:54 +00:00
|
|
|
const { isValidOrgDomain, currentOrgDomain } = orgDomainConfig(window.location.host);
|
|
|
|
const [routerUsername] = router.asPath.replace("%20", "-").split(/[?#]/);
|
|
|
|
if (!isValidOrgDomain || !currentOrgDomain) {
|
|
|
|
const splitPath = routerUsername.split("/");
|
|
|
|
if (splitPath[1] === "team" && splitPath.length === 3) {
|
|
|
|
// Accessing a non-existent team
|
|
|
|
setUsername(splitPath[2]);
|
|
|
|
setCurrentPageType(pageType.TEAM);
|
|
|
|
setUrl(`${WEBSITE_URL}/signup?callbackUrl=settings/teams/new%3Fslug%3D${username.replace("/", "")}`);
|
|
|
|
} else {
|
|
|
|
setUsername(routerUsername);
|
|
|
|
setUrl(`${WEBSITE_URL}/signup?username=${username.replace("/", "")}`);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
setUsername(currentOrgDomain);
|
|
|
|
setCurrentPageType(pageType.ORG);
|
|
|
|
setUrl(
|
|
|
|
`${WEBSITE_URL}/signup?callbackUrl=settings/organizations/new%3Fslug%3D${username.replace("/", "")}`
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}, []);
|
2022-02-11 12:44:25 +00:00
|
|
|
|
2022-11-29 20:27:29 +00:00
|
|
|
const isSuccessPage = router.asPath.startsWith("/booking");
|
2022-05-25 01:29:29 +00:00
|
|
|
const isSubpage = router.asPath.includes("/", 2) || isSuccessPage;
|
|
|
|
const isSignup = router.asPath.startsWith("/signup");
|
2023-03-28 23:24:57 +00:00
|
|
|
/**
|
|
|
|
* If we're on 404 and the route is insights it means it is disabled
|
|
|
|
* TODO: Abstract this for all disabled features
|
|
|
|
**/
|
|
|
|
const isInsights = router.asPath.startsWith("/insights");
|
|
|
|
if (isInsights) {
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<HeadSeo
|
|
|
|
title="Feature is currently disabled"
|
|
|
|
description={t("404_page_not_found")}
|
|
|
|
nextSeoProps={{
|
|
|
|
nofollow: true,
|
|
|
|
noindex: true,
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
<div className="min-h-screen bg-white px-4" data-testid="404-page">
|
2023-06-22 22:25:37 +00:00
|
|
|
<main className="mx-auto max-w-xl pb-6 pt-16 sm:pt-24">
|
2023-03-28 23:24:57 +00:00
|
|
|
<div className="text-center">
|
|
|
|
<p className="text-sm font-semibold uppercase tracking-wide text-black">{t("error_404")}</p>
|
|
|
|
<h1 className="font-cal mt-2 text-4xl font-extrabold text-gray-900 sm:text-5xl">
|
|
|
|
Feature is currently disabled
|
|
|
|
</h1>
|
|
|
|
</div>
|
|
|
|
<div className="mt-12">
|
|
|
|
<div className="mt-8">
|
|
|
|
<Link href="/" className="text-base font-medium text-black hover:text-gray-500">
|
|
|
|
{t("or_go_back_home")}
|
|
|
|
<span aria-hidden="true"> →</span>
|
|
|
|
</Link>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
</div>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
}
|
2021-09-10 21:46:26 +00:00
|
|
|
|
2023-06-23 20:01:54 +00:00
|
|
|
if (!username) return null;
|
|
|
|
|
2021-08-08 15:13:31 +00:00
|
|
|
return (
|
|
|
|
<>
|
2021-08-27 12:35:20 +00:00
|
|
|
<HeadSeo
|
2022-02-08 13:38:13 +00:00
|
|
|
title={isSignup ? t("signup_requires") : t("404_page_not_found")}
|
2021-10-14 14:24:21 +00:00
|
|
|
description={t("404_page_not_found")}
|
2021-08-27 12:35:20 +00:00
|
|
|
nextSeoProps={{
|
|
|
|
nofollow: true,
|
|
|
|
noindex: true,
|
|
|
|
}}
|
|
|
|
/>
|
2023-04-05 18:14:46 +00:00
|
|
|
<div className="bg-default min-h-screen px-4" data-testid="404-page">
|
2023-06-22 22:25:37 +00:00
|
|
|
<main className="mx-auto max-w-xl pb-6 pt-16 sm:pt-24">
|
2022-03-26 00:39:38 +00:00
|
|
|
{isSignup && process.env.NEXT_PUBLIC_WEBAPP_URL !== "https://app.cal.com" ? (
|
2022-02-08 13:38:13 +00:00
|
|
|
<div>
|
|
|
|
<div>
|
2023-04-05 18:14:46 +00:00
|
|
|
<p className="text-emphasis text-sm font-semibold uppercase tracking-wide">
|
2022-02-08 13:38:13 +00:00
|
|
|
{t("missing_license")}
|
|
|
|
</p>
|
2023-04-05 18:14:46 +00:00
|
|
|
<h1 className="font-cal text-emphasis mt-2 text-3xl font-extrabold">
|
2022-02-08 13:38:13 +00:00
|
|
|
{t("signup_requires")}
|
|
|
|
</h1>
|
2023-04-04 09:49:44 +00:00
|
|
|
<p className="mt-4">{t("signup_requires_description", { companyName: "Cal.com" })}</p>
|
2022-02-08 13:38:13 +00:00
|
|
|
</div>
|
|
|
|
<div className="mt-12">
|
2023-04-05 18:14:46 +00:00
|
|
|
<h2 className="text-subtle text-sm font-semibold uppercase tracking-wide">
|
2022-02-08 13:38:13 +00:00
|
|
|
{t("next_steps")}
|
|
|
|
</h2>
|
|
|
|
<ul role="list" className="mt-4">
|
2022-02-09 00:05:13 +00:00
|
|
|
<li className="border-2 border-green-500 px-4 py-2">
|
2022-02-08 13:38:13 +00:00
|
|
|
<a
|
2022-09-19 15:49:04 +00:00
|
|
|
href="https://console.cal.com"
|
2022-02-09 00:05:13 +00:00
|
|
|
className="relative flex items-start space-x-4 py-6 rtl:space-x-reverse">
|
2022-02-08 13:38:13 +00:00
|
|
|
<div className="flex-shrink-0">
|
2022-02-09 00:05:13 +00:00
|
|
|
<span className="flex h-12 w-12 items-center justify-center rounded-lg bg-green-50">
|
2023-04-12 15:26:31 +00:00
|
|
|
<Check className="h-6 w-6 text-green-500" aria-hidden="true" />
|
2022-02-08 13:38:13 +00:00
|
|
|
</span>
|
|
|
|
</div>
|
2022-02-09 00:05:13 +00:00
|
|
|
<div className="min-w-0 flex-1">
|
2023-04-05 18:14:46 +00:00
|
|
|
<h3 className="text-emphasis text-base font-medium">
|
|
|
|
<span className="focus-within:ring-empthasis rounded-sm focus-within:ring-2 focus-within:ring-offset-2">
|
2022-02-08 13:38:13 +00:00
|
|
|
<span className="focus:outline-none">
|
|
|
|
<span className="absolute inset-0" aria-hidden="true" />
|
|
|
|
{t("acquire_commercial_license")}
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</h3>
|
2023-04-05 18:14:46 +00:00
|
|
|
<p className="text-subtle text-base">{t("the_infrastructure_plan")}</p>
|
2022-02-08 13:38:13 +00:00
|
|
|
</div>
|
2022-02-09 00:05:13 +00:00
|
|
|
<div className="flex-shrink-0 self-center">
|
2023-04-12 15:26:31 +00:00
|
|
|
<ChevronRight className="text-muted h-5 w-5" aria-hidden="true" />
|
2022-02-08 13:38:13 +00:00
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
2023-04-05 18:14:46 +00:00
|
|
|
<ul role="list" className="border-subtle divide-subtle divide-y">
|
2022-02-08 13:38:13 +00:00
|
|
|
<li className="px-4 py-2">
|
2023-01-06 12:13:56 +00:00
|
|
|
<Link
|
2023-04-04 09:49:44 +00:00
|
|
|
href="https://cal.com/self-hosting/installation"
|
2023-01-06 12:13:56 +00:00
|
|
|
className="relative flex items-start space-x-4 py-6 rtl:space-x-reverse">
|
|
|
|
<div className="flex-shrink-0">
|
2023-04-05 18:14:46 +00:00
|
|
|
<span className="bg-muted flex h-12 w-12 items-center justify-center rounded-lg">
|
2023-04-12 15:26:31 +00:00
|
|
|
<FileText className="text-default h-6 w-6" aria-hidden="true" />
|
2023-01-06 12:13:56 +00:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div className="min-w-0 flex-1">
|
2023-04-05 18:14:46 +00:00
|
|
|
<h3 className="text-emphasis text-base font-medium">
|
|
|
|
<span className="focus-within:ring-empthasis rounded-sm focus-within:ring-2 focus-within:ring-offset-2">
|
2023-01-06 12:13:56 +00:00
|
|
|
<span className="absolute inset-0" aria-hidden="true" />
|
|
|
|
{t("prisma_studio_tip")}
|
2021-09-10 21:46:26 +00:00
|
|
|
</span>
|
2023-01-06 12:13:56 +00:00
|
|
|
</h3>
|
2023-04-05 18:14:46 +00:00
|
|
|
<p className="text-subtle text-base">{t("prisma_studio_tip_description")}</p>
|
2023-01-06 12:13:56 +00:00
|
|
|
</div>
|
|
|
|
<div className="flex-shrink-0 self-center">
|
2023-04-12 15:26:31 +00:00
|
|
|
<ChevronRight className="text-muted h-5 w-5" aria-hidden="true" />
|
2023-01-06 12:13:56 +00:00
|
|
|
</div>
|
2022-02-08 13:38:13 +00:00
|
|
|
</Link>
|
|
|
|
</li>
|
|
|
|
<li className="px-4 py-2">
|
|
|
|
<a
|
2023-07-04 22:11:10 +00:00
|
|
|
href={JOIN_DISCORD}
|
2022-02-09 00:05:13 +00:00
|
|
|
className="relative flex items-start space-x-4 py-6 rtl:space-x-reverse">
|
2022-02-08 13:38:13 +00:00
|
|
|
<div className="flex-shrink-0">
|
2023-04-05 18:14:46 +00:00
|
|
|
<span className="bg-muted flex h-12 w-12 items-center justify-center rounded-lg">
|
2023-07-04 22:11:10 +00:00
|
|
|
<svg
|
|
|
|
className="text-default h-6 w-6"
|
|
|
|
fill="currentColor"
|
|
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
|
|
viewBox="0 0 127.14 96.36">
|
|
|
|
<title>Discord Logo</title>
|
|
|
|
<path d="M107.7 8.07A105.15 105.15 0 0 0 81.47 0a72.06 72.06 0 0 0-3.36 6.83 97.68 97.68 0 0 0-29.11 0A72.37 72.37 0 0 0 45.64 0a105.89 105.89 0 0 0-26.25 8.09C2.79 32.65-1.71 56.6.54 80.21a105.73 105.73 0 0 0 32.17 16.15 77.7 77.7 0 0 0 6.89-11.11 68.42 68.42 0 0 1-10.85-5.18c.91-.66 1.8-1.34 2.66-2a75.57 75.57 0 0 0 64.32 0c.87.71 1.76 1.39 2.66 2a68.68 68.68 0 0 1-10.87 5.19 77 77 0 0 0 6.89 11.1 105.25 105.25 0 0 0 32.19-16.14c2.64-27.38-4.51-51.11-18.9-72.15ZM42.45 65.69C36.18 65.69 31 60 31 53s5-12.74 11.43-12.74S54 46 53.89 53s-5.05 12.69-11.44 12.69Zm42.24 0C78.41 65.69 73.25 60 73.25 53s5-12.74 11.44-12.74S96.23 46 96.12 53s-5.04 12.69-11.43 12.69Z" />
|
|
|
|
</svg>
|
2021-09-10 21:46:26 +00:00
|
|
|
</span>
|
2022-02-08 13:38:13 +00:00
|
|
|
</div>
|
2022-02-09 00:05:13 +00:00
|
|
|
<div className="min-w-0 flex-1">
|
2023-04-05 18:14:46 +00:00
|
|
|
<h3 className="text-emphasis text-base font-medium">
|
|
|
|
<span className="focus-within:ring-empthasis rounded-sm focus-within:ring-2 focus-within:ring-offset-2">
|
2022-02-08 13:38:13 +00:00
|
|
|
<span className="absolute inset-0" aria-hidden="true" />
|
2023-07-04 22:11:10 +00:00
|
|
|
Discord
|
2022-02-08 13:38:13 +00:00
|
|
|
</span>
|
|
|
|
</h3>
|
2023-04-05 18:14:46 +00:00
|
|
|
<p className="text-subtle text-base">{t("join_our_community")}</p>
|
2022-02-08 13:38:13 +00:00
|
|
|
</div>
|
2022-02-09 00:05:13 +00:00
|
|
|
<div className="flex-shrink-0 self-center">
|
2023-04-12 15:26:31 +00:00
|
|
|
<ChevronRight className="text-muted h-5 w-5" aria-hidden="true" />
|
2022-02-08 13:38:13 +00:00
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<div className="mt-8">
|
2023-01-06 12:13:56 +00:00
|
|
|
<Link
|
2023-04-05 18:14:46 +00:00
|
|
|
href={`${WEBSITE_URL}/enterprise`}
|
|
|
|
className="hover:text-subtle text-emphasis text-base font-medium">
|
2023-01-06 12:13:56 +00:00
|
|
|
{t("contact_sales")}
|
|
|
|
<span aria-hidden="true"> →</span>
|
2022-02-08 13:38:13 +00:00
|
|
|
</Link>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
) : (
|
|
|
|
<>
|
|
|
|
<div className="text-center">
|
2023-04-05 18:14:46 +00:00
|
|
|
<p className="text-emphasis text-sm font-semibold uppercase tracking-wide">
|
|
|
|
{t("error_404")}
|
|
|
|
</p>
|
|
|
|
<h1 className="font-cal text-emphasis mt-2 text-4xl font-extrabold sm:text-5xl">
|
2023-06-21 23:29:53 +00:00
|
|
|
{isSuccessPage ? "Booking not found" : t("page_doesnt_exist")}
|
2022-02-08 13:38:13 +00:00
|
|
|
</h1>
|
2023-06-23 20:01:54 +00:00
|
|
|
{isSubpage && currentPageType !== pageType.TEAM ? (
|
2022-02-09 00:05:13 +00:00
|
|
|
<span className="mt-2 inline-block text-lg ">
|
2022-02-08 13:38:13 +00:00
|
|
|
{t("check_spelling_mistakes_or_go_back")}
|
|
|
|
</span>
|
2023-07-10 14:10:30 +00:00
|
|
|
) : IS_CALCOM ? (
|
2022-09-19 15:49:04 +00:00
|
|
|
<a target="_blank" href={url} className="mt-2 inline-block text-lg" rel="noreferrer">
|
2023-06-23 20:01:54 +00:00
|
|
|
{t(`404_the_${currentPageType.toLowerCase()}`)}{" "}
|
2022-11-30 21:52:56 +00:00
|
|
|
<strong className="text-blue-500">
|
|
|
|
{new URL(WEBSITE_URL).hostname}
|
|
|
|
{username}
|
|
|
|
</strong>{" "}
|
2022-09-19 15:49:04 +00:00
|
|
|
{t("is_still_available")} <span className="text-blue-500">{t("register_now")}</span>.
|
|
|
|
</a>
|
2022-02-08 13:38:13 +00:00
|
|
|
) : (
|
2022-02-11 12:44:25 +00:00
|
|
|
<span className="mt-2 inline-block text-lg">
|
2023-06-23 20:01:54 +00:00
|
|
|
{t(`404_the_${currentPageType.toLowerCase()}`)}{" "}
|
2022-02-11 12:44:25 +00:00
|
|
|
<strong className="text-lgtext-green-500 mt-2 inline-block">{username}</strong>{" "}
|
2022-02-08 13:38:13 +00:00
|
|
|
{t("is_still_available")}
|
2022-02-11 12:44:25 +00:00
|
|
|
</span>
|
2022-02-08 13:38:13 +00:00
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
<div className="mt-12">
|
2023-07-10 14:10:30 +00:00
|
|
|
{((!isSubpage && IS_CALCOM) ||
|
2023-06-23 20:01:54 +00:00
|
|
|
currentPageType === pageType.ORG ||
|
|
|
|
currentPageType === pageType.TEAM) && (
|
|
|
|
<ul role="list" className="my-4">
|
2022-02-09 00:05:13 +00:00
|
|
|
<li className="border-2 border-green-500 px-4 py-2">
|
2022-09-19 15:49:04 +00:00
|
|
|
<a
|
|
|
|
href={url}
|
|
|
|
target="_blank"
|
|
|
|
className="relative flex items-start space-x-4 py-6 rtl:space-x-reverse"
|
|
|
|
rel="noreferrer">
|
|
|
|
<div className="flex-shrink-0">
|
|
|
|
<span className="flex h-12 w-12 items-center justify-center rounded-lg bg-green-50">
|
2023-04-12 15:26:31 +00:00
|
|
|
<Check className="h-6 w-6 text-green-500" aria-hidden="true" />
|
2022-09-19 15:49:04 +00:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div className="min-w-0 flex-1">
|
2023-04-05 18:14:46 +00:00
|
|
|
<h3 className="text-emphasis text-base font-medium">
|
|
|
|
<span className="focus-within:ring-empthasis rounded-sm focus-within:ring-2 focus-within:ring-offset-2">
|
2022-09-19 15:49:04 +00:00
|
|
|
<span className="focus:outline-none">
|
|
|
|
<span className="absolute inset-0" aria-hidden="true" />
|
2023-06-23 20:01:54 +00:00
|
|
|
{t("register")}{" "}
|
|
|
|
<strong className="text-green-500">{`${
|
|
|
|
currentPageType === pageType.TEAM
|
|
|
|
? `${new URL(WEBSITE_URL).host}/team/`
|
|
|
|
: ""
|
|
|
|
}${username}${
|
|
|
|
currentPageType === pageType.ORG ? `.${subdomainSuffix()}` : ""
|
|
|
|
}`}</strong>
|
2022-02-10 11:46:35 +00:00
|
|
|
</span>
|
2022-09-19 15:49:04 +00:00
|
|
|
</span>
|
|
|
|
</h3>
|
2023-06-23 20:01:54 +00:00
|
|
|
<p className="text-subtle text-base">
|
|
|
|
{t(`404_claim_entity_${currentPageType.toLowerCase()}`)}
|
|
|
|
</p>
|
2022-09-19 15:49:04 +00:00
|
|
|
</div>
|
|
|
|
<div className="flex-shrink-0 self-center">
|
2023-04-12 15:26:31 +00:00
|
|
|
<ChevronRight className="text-muted h-5 w-5" aria-hidden="true" />
|
2022-09-19 15:49:04 +00:00
|
|
|
</div>
|
|
|
|
</a>
|
2022-02-08 13:38:13 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
)}
|
2023-06-23 20:01:54 +00:00
|
|
|
<h2 className="text-subtle text-sm font-semibold uppercase tracking-wide">
|
|
|
|
{t("popular_pages")}
|
|
|
|
</h2>
|
|
|
|
<ul role="list" className="border-subtle divide-subtle divide-y">
|
|
|
|
{links
|
|
|
|
.filter((_, idx) => currentPageType === pageType.ORG || idx !== 0)
|
|
|
|
.map((link, linkIdx) => (
|
|
|
|
<li key={linkIdx} className="px-4 py-2">
|
|
|
|
<Link
|
|
|
|
href={link.href}
|
|
|
|
className="relative flex items-start space-x-4 py-6 rtl:space-x-reverse">
|
|
|
|
<div className="flex-shrink-0">
|
|
|
|
<span className="bg-muted flex h-12 w-12 items-center justify-center rounded-lg">
|
|
|
|
<link.icon className="text-default h-6 w-6" aria-hidden="true" />
|
2022-02-08 13:38:13 +00:00
|
|
|
</span>
|
2023-06-23 20:01:54 +00:00
|
|
|
</div>
|
|
|
|
<div className="min-w-0 flex-1">
|
|
|
|
<h3 className="text-emphasis text-base font-medium">
|
|
|
|
<span className="focus-within:ring-empthasis rounded-sm focus-within:ring-2 focus-within:ring-offset-2">
|
|
|
|
<span className="absolute inset-0" aria-hidden="true" />
|
|
|
|
{link.title}
|
|
|
|
</span>
|
|
|
|
</h3>
|
|
|
|
<p className="text-subtle text-base">{link.description}</p>
|
|
|
|
</div>
|
|
|
|
<div className="flex-shrink-0 self-center">
|
|
|
|
<ChevronRight className="text-muted h-5 w-5" aria-hidden="true" />
|
|
|
|
</div>
|
|
|
|
</Link>
|
|
|
|
</li>
|
|
|
|
))}
|
2022-02-08 13:38:13 +00:00
|
|
|
<li className="px-4 py-2">
|
|
|
|
<a
|
2023-07-04 22:11:10 +00:00
|
|
|
href={JOIN_DISCORD}
|
2022-02-09 00:05:13 +00:00
|
|
|
className="relative flex items-start space-x-4 py-6 rtl:space-x-reverse">
|
2021-08-08 16:51:00 +00:00
|
|
|
<div className="flex-shrink-0">
|
2023-04-05 18:14:46 +00:00
|
|
|
<span className="bg-muted flex h-12 w-12 items-center justify-center rounded-lg">
|
2023-07-04 22:11:10 +00:00
|
|
|
<svg
|
|
|
|
className="text-default h-6 w-6"
|
|
|
|
fill="currentColor"
|
|
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
|
|
viewBox="0 0 127.14 96.36">
|
|
|
|
<title>Discord Logo</title>
|
|
|
|
<path d="M107.7 8.07A105.15 105.15 0 0 0 81.47 0a72.06 72.06 0 0 0-3.36 6.83 97.68 97.68 0 0 0-29.11 0A72.37 72.37 0 0 0 45.64 0a105.89 105.89 0 0 0-26.25 8.09C2.79 32.65-1.71 56.6.54 80.21a105.73 105.73 0 0 0 32.17 16.15 77.7 77.7 0 0 0 6.89-11.11 68.42 68.42 0 0 1-10.85-5.18c.91-.66 1.8-1.34 2.66-2a75.57 75.57 0 0 0 64.32 0c.87.71 1.76 1.39 2.66 2a68.68 68.68 0 0 1-10.87 5.19 77 77 0 0 0 6.89 11.1 105.25 105.25 0 0 0 32.19-16.14c2.64-27.38-4.51-51.11-18.9-72.15ZM42.45 65.69C36.18 65.69 31 60 31 53s5-12.74 11.43-12.74S54 46 53.89 53s-5.05 12.69-11.44 12.69Zm42.24 0C78.41 65.69 73.25 60 73.25 53s5-12.74 11.44-12.74S96.23 46 96.12 53s-5.04 12.69-11.43 12.69Z" />
|
|
|
|
</svg>
|
2021-08-08 16:51:00 +00:00
|
|
|
</span>
|
|
|
|
</div>
|
2022-02-09 00:05:13 +00:00
|
|
|
<div className="min-w-0 flex-1">
|
2023-04-05 18:14:46 +00:00
|
|
|
<h3 className="text-emphasis text-base font-medium">
|
|
|
|
<span className="focus-within:ring-empthasis rounded-sm focus-within:ring-2 focus-within:ring-offset-2">
|
2021-08-08 15:13:31 +00:00
|
|
|
<span className="absolute inset-0" aria-hidden="true" />
|
2023-07-04 22:11:10 +00:00
|
|
|
Discord
|
2021-08-08 15:13:31 +00:00
|
|
|
</span>
|
2021-08-08 16:51:00 +00:00
|
|
|
</h3>
|
2023-04-05 18:14:46 +00:00
|
|
|
<p className="text-subtle text-base">{t("join_our_community")}</p>
|
2021-08-08 16:51:00 +00:00
|
|
|
</div>
|
2022-02-09 00:05:13 +00:00
|
|
|
<div className="flex-shrink-0 self-center">
|
2023-04-12 15:26:31 +00:00
|
|
|
<ChevronRight className="text-muted h-5 w-5" aria-hidden="true" />
|
2021-08-08 16:51:00 +00:00
|
|
|
</div>
|
|
|
|
</a>
|
2022-02-08 13:38:13 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<div className="mt-8">
|
2023-04-05 18:14:46 +00:00
|
|
|
<Link href="/" className="hover:text-subtle text-emphasis text-base font-medium">
|
2023-01-06 12:13:56 +00:00
|
|
|
{t("or_go_back_home")}
|
|
|
|
<span aria-hidden="true"> →</span>
|
2021-08-08 16:51:00 +00:00
|
|
|
</Link>
|
2022-02-08 13:38:13 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</>
|
|
|
|
)}
|
2021-08-08 15:13:31 +00:00
|
|
|
</main>
|
|
|
|
</div>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
}
|
2021-12-14 12:31:54 +00:00
|
|
|
|
2023-04-18 18:45:32 +00:00
|
|
|
Custom404.PageWrapper = PageWrapper;
|
|
|
|
|
2021-12-14 12:31:54 +00:00
|
|
|
export const getStaticProps = async (context: GetStaticPropsContext) => {
|
|
|
|
const ssr = await ssgInit(context);
|
|
|
|
|
|
|
|
return {
|
|
|
|
props: {
|
|
|
|
trpcState: ssr.dehydrate(),
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|