From e7a91d459468bd071f41b413332051da70a1c211 Mon Sep 17 00:00:00 2001 From: zomars Date: Fri, 29 Jul 2022 19:28:54 -0600 Subject: [PATCH] Squashed commit of the following: commit e84ca3c1fcb625f8cde160b31c1f2b5def78e0bf Author: zomars Date: Thu Jul 28 14:10:57 2022 -0600 fix commit 29025a1104c2853597b5f3abd0d26aaa27a76aa2 Author: zomars Date: Thu Jul 28 14:10:04 2022 -0600 Force vercel deploy commit b070a6460cf871488340a22d71c14962f37e7023 Author: Hariom Balhara Date: Thu Jul 28 19:03:07 2022 +0530 Avoid global variables leak by making the entire code IIFE (#3543) (#3568) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> commit f05c7c40829947aefb0c67b931420bca18b79b29 Author: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> Date: Wed Jul 27 16:19:59 2022 -0400 Add axiom to next config (#3556) commit c3d05e86862277c270557bab98e170cc8b051afe Author: Hariom Balhara Date: Wed Jul 27 14:12:09 2022 +0530 Potential fix, broken workflow (#3545) commit 36e1c9272fa9b86cbe9e53e03e83799820674f17 Author: zomars Date: Tue Jul 26 18:27:57 2022 -0600 Update [schedule].tsx commit f39535feea22a11a857d179f3506803602a95728 Author: zomars Date: Tue Jul 26 18:07:30 2022 -0600 Update [status].tsx commit c3ac1bcc8c7ff8dc7ebf178d23a6e5c7ea223749 Author: zomars Date: Tue Jul 26 17:53:43 2022 -0600 Update [schedule].tsx commit 39364d8476b3c582d4a7fe3f8d139c5d254e3ecf Author: zomars Date: Tue Jul 26 17:43:13 2022 -0600 Debugging prod commit 4b428d22dec734dab19096b4fe07741f18e5bc5d Author: zomars Date: Tue Jul 26 17:20:44 2022 -0600 Update checkLicense.ts commit 4212e6d61908face52d647bb661d71db959cf864 Author: zomars Date: Tue Jul 26 17:11:37 2022 -0600 Booking fixes attempt commit e3160027ea0ce40d129b445daeb3bb17711ac640 Author: zomars Date: Tue Jul 26 13:52:35 2022 -0600 migration conflict fixes --- apps/web/pages/workflows/[workflow].tsx | 29 ++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/apps/web/pages/workflows/[workflow].tsx b/apps/web/pages/workflows/[workflow].tsx index a9111407a3..6accaf7e50 100644 --- a/apps/web/pages/workflows/[workflow].tsx +++ b/apps/web/pages/workflows/[workflow].tsx @@ -1 +1,28 @@ -export { default } from "@calcom/features/ee/workflows/pages/workflow"; +import { GetStaticPaths, GetStaticProps } from "next"; +import { z } from "zod"; + +export { default } from "@ee/pages/workflows/[workflow]"; + +const querySchema = z.object({ + workflow: z.string(), +}); + +export const getStaticProps: GetStaticProps = (ctx) => { + const params = querySchema.safeParse(ctx.params); + console.log("Built workflow page:", params); + if (!params.success) return { notFound: true }; + + return { + props: { + workflow: params.data.workflow, + }, + revalidate: 10, // seconds + }; +}; + +export const getStaticPaths: GetStaticPaths = () => { + return { + paths: [], + fallback: "blocking", + }; +};