2022-02-18 17:33:18 +00:00
|
|
|
|
import Head from "next/head";
|
2022-12-13 21:09:28 +00:00
|
|
|
|
import { useRouter } from "next/router";
|
2022-02-18 17:33:18 +00:00
|
|
|
|
|
2022-11-30 21:52:56 +00:00
|
|
|
|
import { APP_NAME, WEBSITE_URL } from "@calcom/lib/constants";
|
2022-12-07 20:53:44 +00:00
|
|
|
|
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
2023-01-23 23:08:01 +00:00
|
|
|
|
import { Button, showToast } from "@calcom/ui";
|
|
|
|
|
import { FiCopy } from "@calcom/ui/components/icon";
|
2022-02-18 17:33:18 +00:00
|
|
|
|
|
|
|
|
|
export default function Error500() {
|
2022-12-07 20:53:44 +00:00
|
|
|
|
const { t } = useLocale();
|
2022-12-13 21:09:28 +00:00
|
|
|
|
const router = useRouter();
|
2022-12-07 20:53:44 +00:00
|
|
|
|
|
2022-02-18 17:33:18 +00:00
|
|
|
|
return (
|
2022-12-13 21:09:28 +00:00
|
|
|
|
<div className="flex h-screen bg-gray-100">
|
2022-02-18 17:33:18 +00:00
|
|
|
|
<Head>
|
2022-11-30 21:52:56 +00:00
|
|
|
|
<title>Something unexpected occurred | {APP_NAME}</title>
|
2022-02-18 17:33:18 +00:00
|
|
|
|
<link rel="icon" href="/favicon.ico" />
|
|
|
|
|
</Head>
|
2022-12-13 21:09:28 +00:00
|
|
|
|
<div className="rtl: m-auto rounded-md bg-white p-10 text-right ltr:text-left">
|
|
|
|
|
<h1 className="font-cal text-6xl text-black">500</h1>
|
|
|
|
|
<h2 className="mt-6 text-2xl font-medium text-black">It's not you, it's us.</h2>
|
|
|
|
|
<p className="mt-4 mb-6 max-w-2xl text-sm text-gray-600">
|
2022-02-18 17:33:18 +00:00
|
|
|
|
Something went wrong on our end. Get in touch with our support team, and we’ll get it fixed right
|
|
|
|
|
away for you.
|
|
|
|
|
</p>
|
2022-12-13 21:09:28 +00:00
|
|
|
|
{router.query.error && (
|
|
|
|
|
<div className="mb-8 flex flex-col">
|
|
|
|
|
<p className="mb-4 max-w-2xl text-sm text-gray-600">
|
|
|
|
|
Please provide the following text when contacting support to better help you:
|
|
|
|
|
</p>
|
|
|
|
|
<pre className="w-full max-w-2xl whitespace-normal break-words rounded-md bg-gray-200 p-4 text-gray-900">
|
|
|
|
|
{router.query.error}
|
|
|
|
|
<br />
|
|
|
|
|
<Button
|
|
|
|
|
color="secondary"
|
|
|
|
|
className="mt-2 border-0 font-sans font-normal hover:bg-gray-300"
|
2023-01-23 23:08:01 +00:00
|
|
|
|
StartIcon={FiCopy}
|
2022-12-13 21:09:28 +00:00
|
|
|
|
onClick={() => {
|
|
|
|
|
navigator.clipboard.writeText(router.query.error as string);
|
|
|
|
|
showToast("Link copied!", "success");
|
|
|
|
|
}}>
|
|
|
|
|
{t("copy")}
|
|
|
|
|
</Button>
|
|
|
|
|
</pre>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
2022-12-07 20:53:44 +00:00
|
|
|
|
<Button href={`${WEBSITE_URL}/support`}>{t("contact_support")}</Button>
|
2022-02-18 17:33:18 +00:00
|
|
|
|
<Button color="secondary" href="javascript:history.back()" className="ml-2">
|
|
|
|
|
Go back
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|