Uses ISR on setup pages
This commit is contained in:
1 parent
382f11f740
commit
2b054862df
1 file changed
+3
-6
@@ -31,13 +31,10 @@ export default function SetupInformation(props: InferGetStaticPropsType<typeof g
|
||||
return <AppSetupPage slug={slug} {...props} />;
|
||||
}
|
||||
|
||||
export const getStaticPaths = async () => {
|
||||
const appStore = await prisma.app.findMany({ select: { slug: true } });
|
||||
const paths = appStore.filter((a) => a.slug in AppSetupMap).map((app) => app.slug);
|
||||
|
||||
export const getStaticPaths: GetStaticPaths = async () => {
|
||||
return {
|
||||
paths: paths.map((slug) => ({ params: { slug } })),
|
||||
fallback: false,
|
||||
paths: [],
|
||||
fallback: "blocking",
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user