2022-02-18 17:33:18 +00:00
|
|
|
|
import Head from "next/head";
|
2023-08-02 09:35:48 +00:00
|
|
|
|
import { useSearchParams } from "next/navigation";
|
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";
|
2023-04-12 15:26:31 +00:00
|
|
|
|
import { Copy } from "@calcom/ui/components/icon";
|
2022-02-18 17:33:18 +00:00
|
|
|
|
|
2023-04-18 18:45:32 +00:00
|
|
|
|
import PageWrapper from "@components/PageWrapper";
|
|
|
|
|
|
2022-02-18 17:33:18 +00:00
|
|
|
|
export default function Error500() {
|
2023-08-02 09:35:48 +00:00
|
|
|
|
const searchParams = useSearchParams();
|
2022-12-07 20:53:44 +00:00
|
|
|
|
const { t } = useLocale();
|
|
|
|
|
|
2022-02-18 17:33:18 +00:00
|
|
|
|
return (
|
2023-04-05 18:14:46 +00:00
|
|
|
|
<div className="bg-subtle flex h-screen">
|
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>
|
2023-04-05 18:14:46 +00:00
|
|
|
|
<div className="rtl: bg-default m-auto rounded-md p-10 text-right ltr:text-left">
|
|
|
|
|
<h1 className="font-cal text-emphasis text-6xl">500</h1>
|
|
|
|
|
<h2 className="text-emphasis mt-6 text-2xl font-medium">It's not you, it's us.</h2>
|
2023-06-22 22:25:37 +00:00
|
|
|
|
<p className="text-default mb-6 mt-4 max-w-2xl text-sm">
|
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>
|
2023-08-02 09:35:48 +00:00
|
|
|
|
{searchParams?.get("error") && (
|
2022-12-13 21:09:28 +00:00
|
|
|
|
<div className="mb-8 flex flex-col">
|
2023-04-05 18:14:46 +00:00
|
|
|
|
<p className="text-default mb-4 max-w-2xl text-sm">
|
2022-12-13 21:09:28 +00:00
|
|
|
|
Please provide the following text when contacting support to better help you:
|
|
|
|
|
</p>
|
2023-04-05 18:14:46 +00:00
|
|
|
|
<pre className="bg-emphasis text-emphasis w-full max-w-2xl whitespace-normal break-words rounded-md p-4">
|
2023-08-02 09:35:48 +00:00
|
|
|
|
{searchParams?.get("error")}
|
2022-12-13 21:09:28 +00:00
|
|
|
|
<br />
|
|
|
|
|
<Button
|
|
|
|
|
color="secondary"
|
|
|
|
|
className="mt-2 border-0 font-sans font-normal hover:bg-gray-300"
|
2023-04-12 15:26:31 +00:00
|
|
|
|
StartIcon={Copy}
|
2022-12-13 21:09:28 +00:00
|
|
|
|
onClick={() => {
|
2023-08-02 09:35:48 +00:00
|
|
|
|
navigator.clipboard.writeText(searchParams?.get("error") as string);
|
2022-12-13 21:09:28 +00:00
|
|
|
|
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>
|
|
|
|
|
);
|
|
|
|
|
}
|
2023-04-18 18:45:32 +00:00
|
|
|
|
|
|
|
|
|
Error500.PageWrapper = PageWrapper;
|