Scheduling infrastructure for absolutely everyone.
tweak `inferSSRProps` to not need `as const` (#591)
Alex Johanssona9a6d69ba6fd
diff --git a/pages/[user]/[type].tsx b/pages/[user]/[type].tsxindex 02d297523e1..12f2157777a 100644--- a/pages/[user]/[type].tsx+++ b/pages/[user]/[type].tsx@@ -242,7 +242,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>if (!user) {return {notFound: true,- } as const;+ };}const eventType = await prisma.eventType.findUnique({where: {@@ -271,7 +271,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>if (!eventType || eventType.hidden) {return {notFound: true,- } as const;+ };}// check this is the first eventdiff --git a/pages/event-types/[type].tsx b/pages/event-types/[type].tsxindex 4b1437ce19f..e1de2c85506 100644--- a/pages/event-types/[type].tsx+++ b/pages/event-types/[type].tsx@@ -1097,7 +1097,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>if (!eventType) {return {notFound: true,- } as const;+ };}if (eventType.userId != session.user.id) {diff --git a/pages/getting-started.tsx b/pages/getting-started.tsxindex 3a08b6d8ca0..a7fedc3376a 100644--- a/pages/getting-started.tsx+++ b/pages/getting-started.tsx@@ -609,7 +609,7 @@ export async function getServerSideProps(context: NextPageContext) {redirect: {permanent: false,destination: "/auth/login",- } as const,+ },};}const user = await prisma.user.findFirst({diff --git a/pages/reschedule/[uid].tsx b/pages/reschedule/[uid].tsxindex cf78ab3e7c4..87cfe4916a4 100644--- a/pages/reschedule/[uid].tsx+++ b/pages/reschedule/[uid].tsx@@ -25,7 +25,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {if (!booking?.user || !booking.eventType) {return {notFound: true,- } as const;+ };}return {