fix: allowed copying build error

changed allow copying to optional due to switch game
This commit is contained in:
trafficlunar 2026-02-01 20:38:30 +00:00
parent 3772a23ea6
commit 2e334d155f

View file

@ -94,7 +94,7 @@ export default async function MiiPage({ params }: Props) {
userId: Number(session.user.id), userId: Number(session.user.id),
}, },
select: { userId: true }, select: { userId: true },
} }
: false, : false,
_count: { _count: {
select: { likedBy: true }, // Get total like count select: { likedBy: true }, // Get total like count
@ -144,9 +144,11 @@ export default async function MiiPage({ params }: Props) {
<li> <li>
From: <span className="text-right font-medium">{mii.islandName} Island</span> From: <span className="text-right font-medium">{mii.islandName} Island</span>
</li> </li>
<li> {mii.allowedCopying && (
Allowed Copying: <input type="checkbox" checked={mii.allowedCopying} disabled className="checkbox cursor-auto!" /> <li>
</li> Allowed Copying: <input type="checkbox" checked={mii.allowedCopying} disabled className="checkbox cursor-auto!" />
</li>
)}
</ul> </ul>
{/* Mii Gender */} {/* Mii Gender */}
@ -176,13 +178,7 @@ export default async function MiiPage({ params }: Props) {
{/* Submission name */} {/* Submission name */}
<h1 className="text-4xl font-extrabold wrap-break-word text-amber-700">{mii.name}</h1> <h1 className="text-4xl font-extrabold wrap-break-word text-amber-700">{mii.name}</h1>
{/* Like button */} {/* Like button */}
<LikeButton <LikeButton likes={mii._count.likedBy ?? 0} miiId={mii.id} isLiked={(mii.likedBy ?? []).length > 0} isLoggedIn={session?.user != null} big />
likes={mii._count.likedBy ?? 0}
miiId={mii.id}
isLiked={(mii.likedBy ?? []).length > 0}
isLoggedIn={session?.user != null}
big
/>
</div> </div>
{/* Tags */} {/* Tags */}
<div id="tags" className="flex flex-wrap gap-1 mt-1 *:px-2 *:py-1 *:bg-orange-300 *:rounded-full *:text-xs"> <div id="tags" className="flex flex-wrap gap-1 mt-1 *:px-2 *:py-1 *:bg-orange-300 *:rounded-full *:text-xs">