added 404 for event types (#604)
* added 404 for event types * removed link for 404 event types Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
This commit is contained in:
parent
13180fd807
commit
5a9401bd28
1 changed files with 41 additions and 30 deletions
|
@ -16,7 +16,7 @@ const links = [
|
||||||
title: "API Reference",
|
title: "API Reference",
|
||||||
description: "A complete API reference for our libraries",
|
description: "A complete API reference for our libraries",
|
||||||
icon: CodeIcon,
|
icon: CodeIcon,
|
||||||
href: "https://developer.calendso.com/api",
|
href: "https://api.docs.calendso.com",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Blog",
|
title: "Blog",
|
||||||
|
@ -30,6 +30,8 @@ export default function Custom404() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const username = router.asPath.replace("%20", "-");
|
const username = router.asPath.replace("%20", "-");
|
||||||
|
|
||||||
|
const isEventType404 = router.asPath.includes("/event-types");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<HeadSeo
|
<HeadSeo
|
||||||
|
@ -47,17 +49,25 @@ export default function Custom404() {
|
||||||
<h1 className="mt-2 text-4xl font-extrabold text-gray-900 tracking-tight sm:text-5xl">
|
<h1 className="mt-2 text-4xl font-extrabold text-gray-900 tracking-tight sm:text-5xl">
|
||||||
This page does not exist.
|
This page does not exist.
|
||||||
</h1>
|
</h1>
|
||||||
|
{isEventType404 ? (
|
||||||
|
<span className="inline-block mt-2 text-lg ">
|
||||||
|
Check for spelling mistakes or go back to the previous page.
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
<a href="https://checkout.calendso.com" className="inline-block mt-2 text-lg ">
|
<a href="https://checkout.calendso.com" className="inline-block mt-2 text-lg ">
|
||||||
The username <strong className="text-blue-500">calendso.com{username}</strong> is still
|
The username <strong className="text-blue-500">calendso.com{username}</strong> is still
|
||||||
available. <span className="text-blue-500">Register now</span>.
|
available. <span className="text-blue-500">Register now</span>.
|
||||||
</a>
|
</a>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-12">
|
<div className="mt-12">
|
||||||
<h2 className="text-sm font-semibold text-gray-500 tracking-wide uppercase">Popular pages</h2>
|
<h2 className="text-sm font-semibold text-gray-500 tracking-wide uppercase">Popular pages</h2>
|
||||||
|
{!isEventType404 && (
|
||||||
<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 href="https://checkout.calendso.com" className="relative py-6 flex items-start space-x-4">
|
<a
|
||||||
|
href="https://checkout.calendso.com"
|
||||||
|
className="relative py-6 flex items-start space-x-4">
|
||||||
<div className="flex-shrink-0">
|
<div className="flex-shrink-0">
|
||||||
<span className="flex items-center justify-center h-12 w-12 rounded-lg bg-green-50">
|
<span className="flex items-center justify-center h-12 w-12 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" />
|
||||||
|
@ -80,6 +90,7 @@ export default function Custom404() {
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
)}
|
||||||
|
|
||||||
<ul role="list" className="mt-4 border-gray-200 divide-y divide-gray-200">
|
<ul role="list" className="mt-4 border-gray-200 divide-y divide-gray-200">
|
||||||
{links.map((link, linkIdx) => (
|
{links.map((link, linkIdx) => (
|
||||||
|
|
Loading…
Reference in a new issue