From ebf49ca79ea80ef264e7c9b431b41b61849ed404 Mon Sep 17 00:00:00 2001 From: Alex van Andel Date: Wed, 15 Sep 2021 22:58:47 +0100 Subject: [PATCH] Fixes 404 pages (#664) --- pages/[user]/[type].tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pages/[user]/[type].tsx b/pages/[user]/[type].tsx index 6197ae67..932eb4c4 100644 --- a/pages/[user]/[type].tsx +++ b/pages/[user]/[type].tsx @@ -117,7 +117,10 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) => const eventType = user.eventTypes[0]; // check this is the first event - if (user.plan === "FREE") { + + // TEMPORARILY disabled because of a bug during event create - during which users were able + // to create event types >n1. + /*if (user.plan === "FREE") { const firstEventType = await prisma.eventType.findFirst({ where: { OR: [ @@ -142,7 +145,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) => notFound: true, } as const; } - } + }*/ const getWorkingHours = (providesAvailability: { availability: Availability[] }) => providesAvailability.availability && providesAvailability.availability.length ? providesAvailability.availability