From 821105dccbe9a0ba982a8bd26c535ca96a29df3f 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 c08f27de42..cedef0f9aa 100644 --- a/apps/web/pages/event-types/[type].tsx +++ b/apps/web/pages/event-types/[type].tsx @@ -369,7 +369,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 }, []); @@ -2184,6 +2184,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) => successRedirectUrl: true, team: { select: { + id: true, slug: true, members: { where: {