From 5c0983ef6c0cec04df0ee8ccdff02f9ea460167d Mon Sep 17 00:00:00 2001 From: Peer Richelsen Date: Thu, 10 Feb 2022 11:46:35 +0000 Subject: [PATCH] added Link component to see if it fixes the 404 link bug (#1784) --- pages/404.tsx | 64 +++++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/pages/404.tsx b/pages/404.tsx index 283fa672..39f06fb3 100644 --- a/pages/404.tsx +++ b/pages/404.tsx @@ -32,6 +32,8 @@ export default function Custom404() { const isSubpage = router.asPath.includes("/", 2); const isSignup = router.asPath.includes("/signup"); + const isCalcom = process.env.NEXT_PUBLIC_BASE_URL === "https://app.cal.com"; + const signupLink = "https://cal.com/signup?username=" + username.replace("/", ""); return ( <> @@ -175,13 +177,13 @@ export default function Custom404() { {t("check_spelling_mistakes_or_go_back")} - ) : process.env.NEXT_PUBLIC_BASE_URL === "https://app.cal.com" ? ( - - {t("the_username")} cal.com{username}{" "} - {t("is_still_available")} {t("register_now")}. - + ) : isCalcom ? ( + + + {t("the_username")} cal.com{username}{" "} + {t("is_still_available")} {t("register_now")}. + + ) : ( <> {t("the_username")}{" "} @@ -197,32 +199,34 @@ export default function Custom404() {

{t("popular_pages")}

- {!isSubpage && process.env.NEXT_PUBLIC_BASE_URL === "https://app.cal.com" && ( + {!isSubpage && isCalcom && ( )}