From 9a99d67baf903c02511e80726a529dfd355d5d00 Mon Sep 17 00:00:00 2001 From: "Kalle (Sendou)" <38327916+Sendouc@users.noreply.github.com> Date: Wed, 2 Dec 2020 10:11:53 +0200 Subject: [PATCH] pre-render all u pages --- pages/u/[identifier].tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pages/u/[identifier].tsx b/pages/u/[identifier].tsx index c06d9996c..fd796804a 100644 --- a/pages/u/[identifier].tsx +++ b/pages/u/[identifier].tsx @@ -140,12 +140,11 @@ const ProfilePage = (props: Props) => { export const getStaticPaths: GetStaticPaths = async () => { const users = await prisma.user.findMany({ - where: { NOT: [{ profile: { customUrlPath: null } }] }, include: { profile: true }, }); return { paths: users.map((u) => ({ - params: { identifier: u.profile!.customUrlPath! }, + params: { identifier: u.profile?.customUrlPath ?? u.discordId }, })), fallback: true, };