first commit
This commit is contained in:
19
calcom/apps/web/lib/workflows/[workflow]/getStaticProps.tsx
Normal file
19
calcom/apps/web/lib/workflows/[workflow]/getStaticProps.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import type { GetStaticProps } from "next";
|
||||
import { z } from "zod";
|
||||
|
||||
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
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user