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 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() { | |||
|                   <span className="mt-2 inline-block text-lg "> | ||||
|                     {t("check_spelling_mistakes_or_go_back")} | ||||
|                   </span> | ||||
|                 ) : process.env.NEXT_PUBLIC_BASE_URL === "https://app.cal.com" ? ( | ||||
|                   <a | ||||
|                     href={"https://cal.com/signup?username=" + username.replace("/", "")} | ||||
|                     className="mt-2 inline-block text-lg "> | ||||
|                 ) : isCalcom ? ( | ||||
|                   <Link href={signupLink}> | ||||
|                     <a className="mt-2 inline-block text-lg"> | ||||
|                       {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>. | ||||
|                     </a> | ||||
|                   </Link> | ||||
|                 ) : ( | ||||
|                   <> | ||||
|                     {t("the_username")}{" "} | ||||
|  | @ -197,12 +199,11 @@ export default function Custom404() { | |||
|                 <h2 className="text-sm font-semibold uppercase tracking-wide text-gray-500"> | ||||
|                   {t("popular_pages")} | ||||
|                 </h2> | ||||
|                 {!isSubpage && process.env.NEXT_PUBLIC_BASE_URL === "https://app.cal.com" && ( | ||||
|                 {!isSubpage && isCalcom && ( | ||||
|                   <ul role="list" className="mt-4"> | ||||
|                     <li className="border-2 border-green-500 px-4 py-2"> | ||||
|                       <a | ||||
|                         href={"https://cal.com/signup?username=" + username.replace("/", "")} | ||||
|                         className="relative flex items-start space-x-4 py-6 rtl:space-x-reverse"> | ||||
|                       <Link href={signupLink}> | ||||
|                         <a className="relative flex items-start space-x-4 py-6 rtl:space-x-reverse"> | ||||
|                           <div className="flex-shrink-0"> | ||||
|                             <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" /> | ||||
|  | @ -217,12 +218,15 @@ export default function Custom404() { | |||
|                                 </span> | ||||
|                               </span> | ||||
|                             </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 className="flex-shrink-0 self-center"> | ||||
|                             <ChevronRightIcon className="h-5 w-5 text-gray-400" aria-hidden="true" /> | ||||
|                           </div> | ||||
|                         </a> | ||||
|                       </Link> | ||||
|                     </li> | ||||
|                   </ul> | ||||
|                 )} | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Peer Richelsen
						Peer Richelsen