Skip to content

Scheduling infrastructure for absolutely everyone.

Fix ordering of event-types (#3126)

Hariom Balhara2f5928be841c
diff --git a/apps/web/pages/[user]/[type].tsx b/apps/web/pages/[user]/[type].tsx
index 713841026c9..ed25ac3f13b 100644
--- a/apps/web/pages/[user]/[type].tsx
+++ b/apps/web/pages/[user]/[type].tsx
@@ -87,6 +87,15 @@ async function getUserPageProps(context: GetStaticPropsContext) {
darkBrandColor: true,
eventTypes: {
select: { id: true },
+ // Order by position is important to ensure that the event-type that's enabled is the first in the list because for Free user only first is allowed.
+ orderBy: [
+ {
+ position: "desc",
+ },
+ {
+ id: "asc",
+ },
+ ],
},
},
});