From 5a9401bd2886903ce1921622ab5a7e8087f91e03 Mon Sep 17 00:00:00 2001 From: Peer_Rich Date: Fri, 10 Sep 2021 23:46:26 +0200 Subject: [PATCH] added 404 for event types (#604) * added 404 for event types * removed link for 404 event types Co-authored-by: Bailey Pumfleet --- pages/404.tsx | 71 +++++++++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 30 deletions(-) diff --git a/pages/404.tsx b/pages/404.tsx index 51c586ef..a2f79a0c 100644 --- a/pages/404.tsx +++ b/pages/404.tsx @@ -16,7 +16,7 @@ const links = [ title: "API Reference", description: "A complete API reference for our libraries", icon: CodeIcon, - href: "https://developer.calendso.com/api", + href: "https://api.docs.calendso.com", }, { title: "Blog", @@ -30,6 +30,8 @@ export default function Custom404() { const router = useRouter(); const username = router.asPath.replace("%20", "-"); + const isEventType404 = router.asPath.includes("/event-types"); + return ( <> This page does not exist. - - The username calendso.com{username} is still - available. Register now. - + {isEventType404 ? ( + + Check for spelling mistakes or go back to the previous page. + + ) : ( + + The username calendso.com{username} is still + available. Register now. + + )}

Popular pages

- - +
+
+

+ + + + +

+

Claim your username and schedule events

+
+
+
+ + + + )}
    {links.map((link, linkIdx) => (