fix: calculate user's liked miis after if user exists statement
This commit is contained in:
parent
50b402e5d9
commit
5eab64ef96
1 changed files with 2 additions and 2 deletions
|
|
@ -24,10 +24,10 @@ export default async function ProfilePage({ params, searchParams }: Props) {
|
|||
},
|
||||
});
|
||||
|
||||
const likedMiis = await prisma.like.count({ where: { userId: Number(slug) } });
|
||||
|
||||
if (!user) redirect("/404");
|
||||
|
||||
const likedMiis = await prisma.like.count({ where: { userId: Number(slug) } });
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="flex gap-4 mb-2">
|
||||
|
|
|
|||
Loading…
Reference in a new issue