chore: App router migration (/workflows) fix metadata and remove duplicate file for getStaticProps (#16452)
* Fix metadata * add use client directive to workflow component
This commit is contained in:
1 parent
779eb19e7a
commit
55d75a9786
6 files changed
+67
-72
No files matched your search
@@ -1,19 +0,0 @@
|
||||
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