2
0
Files
cal/calcom/apps/web/lib/workflows/[workflow]/getStaticProps.tsx

20 lines
445 B
TypeScript
Raw Normal View History

2024-08-09 00:39:27 +02:00
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
};
};