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
|
|
|
|
2023-08-09 19:57:22 +00:00
|
|
|
import { APP_NAME } 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-08-09 19:57:22 +00:00
|
|
|
<p className="text-default mb-6 mt-4 max-w-2xl text-sm">{t("something_went_wrong_on_our_end")}</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">
|
2023-08-09 19:57:22 +00:00
|
|
|
{t("please_provide_following_text_to_suppport")}:
|
2022-12-13 21:09:28 +00:00
|
|
|
</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>
|
|
|
|
)}
|
2023-08-09 19:57:22 +00:00
|
|
|
<Button href="mailto:support@cal.com">{t("contact_support")}</Button>
|
2022-02-18 17:33:18 +00:00
|
|
|
<Button color="secondary" href="javascript:history.back()" className="ml-2">
|
2023-08-09 19:57:22 +00:00
|
|
|
{t("go_back")}
|
2022-02-18 17:33:18 +00:00
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
2023-04-18 18:45:32 +00:00
|
|
|
|
|
|
|
Error500.PageWrapper = PageWrapper;
|