From a331d02668d121172fdf22841bf1246ca60d2b8c Mon Sep 17 00:00:00 2001 From: Alex van Andel Date: Wed, 17 Aug 2022 00:38:26 +0100 Subject: [PATCH] Hotfix/dos mitigation attempt error configuration (#3879) * Fixes 'Task timed out after 60.03 seconds' * DDoS rewrite fixes Co-authored-by: zomars --- apps/web/pages/auth/error.tsx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/apps/web/pages/auth/error.tsx b/apps/web/pages/auth/error.tsx index df6aa2f528..bfb363e919 100644 --- a/apps/web/pages/auth/error.tsx +++ b/apps/web/pages/auth/error.tsx @@ -1,15 +1,14 @@ -import { GetServerSidePropsContext } from "next"; +import { GetStaticPropsContext } from "next"; import Link from "next/link"; import { useRouter } from "next/router"; +import { useLocale } from "@calcom/lib/hooks/useLocale"; import Button from "@calcom/ui/Button"; import { Icon } from "@calcom/ui/Icon"; -import { useLocale } from "@lib/hooks/useLocale"; - import AuthContainer from "@components/ui/AuthContainer"; -import { ssrInit } from "@server/lib/ssr"; +import { ssgInit } from "@server/lib/ssg"; export default function Error() { const { t } = useLocale(); @@ -40,12 +39,12 @@ export default function Error() { ); } -export async function getServerSideProps(context: GetServerSidePropsContext) { - const ssr = await ssrInit(context); +export const getStaticProps = async (context: GetStaticPropsContext) => { + const ssr = await ssgInit(context); return { props: { trpcState: ssr.dehydrate(), }, }; -} +};