fix: New booker selected date issues (#9570)
* Pick correct selected date * Commented out unused booking page revalidation * Fixed selected default bookerLayout not being applied * Use the right weekdayOfFirst - date(1) of browsingDate
This commit is contained in:
1 parent
bdc5e9c7e9
commit
74671263bf
5 files changed
+16
-14
No files matched your search
@@ -129,13 +129,13 @@ export const updateProfileHandler = async ({ ctx, input }: UpdateProfileOptions)
|
||||
});
|
||||
}
|
||||
// Revalidate booking pages
|
||||
const res = ctx.res as NextApiResponse;
|
||||
// Disabled because the booking pages are currently not using getStaticProps
|
||||
/*const res = ctx.res as NextApiResponse;
|
||||
if (typeof res?.revalidate !== "undefined") {
|
||||
const eventTypes = await prisma.eventType.findMany({
|
||||
where: {
|
||||
userId: user.id,
|
||||
team: null,
|
||||
hidden: false,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
@@ -143,9 +143,11 @@ export const updateProfileHandler = async ({ ctx, input }: UpdateProfileOptions)
|
||||
},
|
||||
});
|
||||
// waiting for this isn't needed
|
||||
Promise.all(eventTypes.map((eventType) => res?.revalidate(`/${ctx.user.username}/${eventType.slug}`)))
|
||||
Promise.all(
|
||||
eventTypes.map((eventType) => res?.revalidate(`/new-booker/${ctx.user.username}/${eventType.slug}`))
|
||||
)
|
||||
.then(() => console.info("Booking pages revalidated"))
|
||||
.catch((e) => console.error(e));
|
||||
}
|
||||
}*/
|
||||
return input;
|
||||
};
|
||||
Reference in new issue
Block a user