From 80954aa86647db4bbf3c41d033f071f6fb6a5589 Mon Sep 17 00:00:00 2001 From: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Date: Wed, 18 May 2022 15:59:23 +0100 Subject: [PATCH] Add team Id to hash url (#2803) --- apps/web/pages/event-types/[type].tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/web/pages/event-types/[type].tsx b/apps/web/pages/event-types/[type].tsx index dae70aa507..3c585166eb 100644 --- a/apps/web/pages/event-types/[type].tsx +++ b/apps/web/pages/event-types/[type].tsx @@ -332,7 +332,7 @@ const EventTypePage = (props: inferSSRProps) => { fetchTokens(); - !hashedUrl && setHashedUrl(generateHashedLink(eventType.users[0].id)); + !hashedUrl && setHashedUrl(generateHashedLink(eventType.users[0]?.id ?? team?.id)); // eslint-disable-next-line react-hooks/exhaustive-deps }, []); @@ -2182,6 +2182,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) => successRedirectUrl: true, team: { select: { + id: true, slug: true, members: { where: {