mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-20 18:29:48 -05:00
pre-render all u pages
This commit is contained in:
parent
25bc21d893
commit
9a99d67baf
|
|
@ -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,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user