Harsh/fix 404 page for undefined events (#5700)
* fix: 404 page for undefined events * Update apps/web/pages/[user]/[type].tsx Co-authored-by: Hariom Balhara <[email protected]> Co-authored-by: Guest <[email protected]> Co-authored-by: Alex van Andel <[email protected]> Co-authored-by: Hariom Balhara <[email protected]>
This commit is contained in:
1 file changed
+1
-1
@@ -121,7 +121,7 @@ async function getUserPageProps(context: GetStaticPropsContext) {
|
||||
"strikethrough",
|
||||
]);
|
||||
|
||||
if (!user || !user.eventTypes) return { notFound: true };
|
||||
if (!user || !user.eventTypes.length) return { notFound: true };
|
||||
|
||||
const [eventType]: (typeof user.eventTypes[number] & {
|
||||
users: Pick<User, "name" | "username" | "hideBranding" | "plan" | "timeZone">[];
|
||||
|
||||
Reference in new issue
Block a user