From 197ee86c32fda570c66dc3cddda264e86c26a4cc Mon Sep 17 00:00:00 2001 From: Alex van Andel Date: Thu, 8 Apr 2021 15:51:13 +0000 Subject: [PATCH] When navigating to a calendso user that does not exist, return notFound. --- pages/[user].tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pages/[user].tsx b/pages/[user].tsx index 54cb78f5eb..4986d118e3 100644 --- a/pages/[user].tsx +++ b/pages/[user].tsx @@ -57,6 +57,12 @@ export async function getServerSideProps(context) { } }); + if (!user) { + return { + notFound: true, + } + } + return { props: { user