From da0ea5d9d036c80abbf2e6d42b917f879c247756 Mon Sep 17 00:00:00 2001 From: Nafees Nazik <84864519+G3root@users.noreply.github.com> Date: Sat, 21 Jan 2023 21:43:55 +0530 Subject: [PATCH] fix: case-sensitivity in apps path (#6552) * fix: lowercase slug * fix: make fallback blocking --- apps/web/pages/apps/[slug]/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/pages/apps/[slug]/index.tsx b/apps/web/pages/apps/[slug]/index.tsx index ab5d8b7bcd..03c3ffe37b 100644 --- a/apps/web/pages/apps/[slug]/index.tsx +++ b/apps/web/pages/apps/[slug]/index.tsx @@ -54,7 +54,7 @@ export const getStaticPaths: GetStaticPaths<{ slug: string }> = async () => { return { paths, - fallback: false, + fallback: "blocking", }; }; @@ -62,7 +62,7 @@ export const getStaticProps = async (ctx: GetStaticPropsContext) => { if (typeof ctx.params?.slug !== "string") return { notFound: true }; const app = await prisma.app.findUnique({ - where: { slug: ctx.params.slug }, + where: { slug: ctx.params.slug.toLowerCase() }, }); if (!app) return { notFound: true };