mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-25 12:35:18 -05:00
pre-render all u pages
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user