2021-11-16 17:12:08 +00:00
|
|
|
import { GetServerSidePropsContext } from "next";
|
2021-08-02 20:51:57 +00:00
|
|
|
import Link from "next/link";
|
2021-09-22 19:52:38 +00:00
|
|
|
import { useRouter } from "next/router";
|
|
|
|
|
2022-03-16 23:36:43 +00:00
|
|
|
import Button from "@calcom/ui/Button";
|
2022-07-27 02:24:00 +00:00
|
|
|
import { Icon } from "@calcom/ui/Icon";
|
2022-03-16 23:36:43 +00:00
|
|
|
|
2021-10-14 14:24:21 +00:00
|
|
|
import { useLocale } from "@lib/hooks/useLocale";
|
|
|
|
|
2022-02-04 20:30:36 +00:00
|
|
|
import AuthContainer from "@components/ui/AuthContainer";
|
2021-03-29 21:01:12 +00:00
|
|
|
|
2021-11-16 17:12:08 +00:00
|
|
|
import { ssrInit } from "@server/lib/ssr";
|
|
|
|
|
2021-03-29 21:01:12 +00:00
|
|
|
export default function Error() {
|
2021-10-14 14:24:21 +00:00
|
|
|
const { t } = useLocale();
|
2021-08-02 20:51:57 +00:00
|
|
|
const router = useRouter();
|
|
|
|
const { error } = router.query;
|
2021-03-29 21:01:12 +00:00
|
|
|
|
2021-08-02 20:51:57 +00:00
|
|
|
return (
|
2022-02-04 20:30:36 +00:00
|
|
|
<AuthContainer title="" description="">
|
|
|
|
<div>
|
2022-02-09 00:05:13 +00:00
|
|
|
<div className="mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-red-100">
|
2022-08-03 16:01:29 +00:00
|
|
|
<Icon.FiX className="h-6 w-6 text-red-600" />
|
2022-02-04 20:30:36 +00:00
|
|
|
</div>
|
|
|
|
<div className="mt-3 text-center sm:mt-5">
|
2022-02-09 00:05:13 +00:00
|
|
|
<h3 className="text-lg font-medium leading-6 text-gray-900" id="modal-title">
|
2022-02-04 20:30:36 +00:00
|
|
|
{error}
|
|
|
|
</h3>
|
|
|
|
<div className="mt-2">
|
|
|
|
<p className="text-sm text-gray-500">{t("error_during_login")}</p>
|
2021-08-02 20:51:57 +00:00
|
|
|
</div>
|
2021-03-29 21:01:12 +00:00
|
|
|
</div>
|
2021-08-02 20:51:57 +00:00
|
|
|
</div>
|
2022-02-04 20:30:36 +00:00
|
|
|
<div className="mt-5 sm:mt-6">
|
2022-05-14 13:49:39 +00:00
|
|
|
<Link href="/auth/login" passHref>
|
2022-02-09 00:05:13 +00:00
|
|
|
<Button className="flex w-full justify-center">{t("go_back_login")}</Button>
|
2022-02-04 20:30:36 +00:00
|
|
|
</Link>
|
|
|
|
</div>
|
|
|
|
</AuthContainer>
|
2021-08-02 20:51:57 +00:00
|
|
|
);
|
2021-07-30 23:05:38 +00:00
|
|
|
}
|
2021-11-16 17:12:08 +00:00
|
|
|
|
|
|
|
export async function getServerSideProps(context: GetServerSidePropsContext) {
|
|
|
|
const ssr = await ssrInit(context);
|
|
|
|
|
|
|
|
return {
|
|
|
|
props: {
|
|
|
|
trpcState: ssr.dehydrate(),
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|