added Link component to see if it fixes the 404 link bug (#1784)
This commit is contained in:
parent
66015cba39
commit
5c0983ef6c
1 changed files with 34 additions and 30 deletions
|
@ -32,6 +32,8 @@ export default function Custom404() {
|
||||||
|
|
||||||
const isSubpage = router.asPath.includes("/", 2);
|
const isSubpage = router.asPath.includes("/", 2);
|
||||||
const isSignup = router.asPath.includes("/signup");
|
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 (
|
return (
|
||||||
<>
|
<>
|
||||||
|
@ -175,13 +177,13 @@ export default function Custom404() {
|
||||||
<span className="mt-2 inline-block text-lg ">
|
<span className="mt-2 inline-block text-lg ">
|
||||||
{t("check_spelling_mistakes_or_go_back")}
|
{t("check_spelling_mistakes_or_go_back")}
|
||||||
</span>
|
</span>
|
||||||
) : process.env.NEXT_PUBLIC_BASE_URL === "https://app.cal.com" ? (
|
) : isCalcom ? (
|
||||||
<a
|
<Link href={signupLink}>
|
||||||
href={"https://cal.com/signup?username=" + username.replace("/", "")}
|
<a className="mt-2 inline-block text-lg">
|
||||||
className="mt-2 inline-block text-lg ">
|
|
||||||
{t("the_username")} <strong className="text-blue-500">cal.com{username}</strong>{" "}
|
{t("the_username")} <strong className="text-blue-500">cal.com{username}</strong>{" "}
|
||||||
{t("is_still_available")} <span className="text-blue-500">{t("register_now")}</span>.
|
{t("is_still_available")} <span className="text-blue-500">{t("register_now")}</span>.
|
||||||
</a>
|
</a>
|
||||||
|
</Link>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
{t("the_username")}{" "}
|
{t("the_username")}{" "}
|
||||||
|
@ -197,12 +199,11 @@ export default function Custom404() {
|
||||||
<h2 className="text-sm font-semibold uppercase tracking-wide text-gray-500">
|
<h2 className="text-sm font-semibold uppercase tracking-wide text-gray-500">
|
||||||
{t("popular_pages")}
|
{t("popular_pages")}
|
||||||
</h2>
|
</h2>
|
||||||
{!isSubpage && process.env.NEXT_PUBLIC_BASE_URL === "https://app.cal.com" && (
|
{!isSubpage && isCalcom && (
|
||||||
<ul role="list" className="mt-4">
|
<ul role="list" className="mt-4">
|
||||||
<li className="border-2 border-green-500 px-4 py-2">
|
<li className="border-2 border-green-500 px-4 py-2">
|
||||||
<a
|
<Link href={signupLink}>
|
||||||
href={"https://cal.com/signup?username=" + username.replace("/", "")}
|
<a className="relative flex items-start space-x-4 py-6 rtl:space-x-reverse">
|
||||||
className="relative flex items-start space-x-4 py-6 rtl:space-x-reverse">
|
|
||||||
<div className="flex-shrink-0">
|
<div className="flex-shrink-0">
|
||||||
<span className="flex h-12 w-12 items-center justify-center rounded-lg bg-green-50">
|
<span className="flex h-12 w-12 items-center justify-center rounded-lg bg-green-50">
|
||||||
<CheckIcon className="h-6 w-6 text-green-500" aria-hidden="true" />
|
<CheckIcon className="h-6 w-6 text-green-500" aria-hidden="true" />
|
||||||
|
@ -217,12 +218,15 @@ export default function Custom404() {
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
<p className="text-base text-gray-500">{t("claim_username_and_schedule_events")}</p>
|
<p className="text-base text-gray-500">
|
||||||
|
{t("claim_username_and_schedule_events")}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex-shrink-0 self-center">
|
<div className="flex-shrink-0 self-center">
|
||||||
<ChevronRightIcon className="h-5 w-5 text-gray-400" aria-hidden="true" />
|
<ChevronRightIcon className="h-5 w-5 text-gray-400" aria-hidden="true" />
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in a new issue