Uses ISR on setup pages

pull/3569/head
zomars 2022-07-29 22:04:36 -06:00
parent 382f11f740
commit 2b054862df
1 changed files with 3 additions and 6 deletions

View File

@ -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",
};
};