Removed v2 pages directory, moved all pages to root and deleted old v1 pages and middleware redirect. (#5044)
* Removed v2 pages directory, moved all pages to root and deleted old v1 pages and middleware redirect. * Removed v2 from imports path. Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
1 parent
aee1b3b596
commit
0284ffc75f
51 files changed
+74
-530
No files matched your search
@@ -0,0 +1,28 @@
|
||||
import { GetStaticPaths, GetStaticProps } from "next";
|
||||
import { z } from "zod";
|
||||
|
||||
export { default } from "@calcom/features/ee/workflows/pages/v2/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",
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
export { default } from "@calcom/features/ee/workflows/pages/v2/index";
|
||||
Reference in new issue
Block a user