This commit is contained in:
trafficlunar 2026-04-17 16:50:44 +01:00
parent f5391d63e6
commit 2f485dfca5
2 changed files with 4 additions and 3 deletions

View file

@ -54,7 +54,7 @@ COPY --from=builder /app/backend/.next ./.next
COPY --from=builder --chown=nextjs:nodejs /app/backend/prisma ./prisma COPY --from=builder --chown=nextjs:nodejs /app/backend/prisma ./prisma
# uploads dir # uploads dir
RUN mkdir -p /app/uploads && chown -R nextjs:nodejs /app/uploads RUN mkdir -p /app/uploads && chown -R nextjs:nodejs /app/.next/standalone/backend/uploads
USER nextjs USER nextjs

View file

@ -25,6 +25,7 @@ export default function MiiPage() {
return res.json(); return res.json();
}) })
.then((data) => { .then((data) => {
console.log("Mii API response:", data);
setMii(data); setMii(data);
setLoading(false); setLoading(false);
}) })
@ -39,7 +40,7 @@ export default function MiiPage() {
return <div className="p-6 text-center">Loading...</div>; return <div className="p-6 text-center">Loading...</div>;
} }
const images = [...Array.from({ length: mii.imageCount }, (_, index) => `${API_URL}/mii/${mii.id}/image?type=image${index}`)]; const images = [...Array.from({ length: mii.imageCount ?? 0 }, (_, index) => `${API_URL}/mii/${mii.id}/image?type=image${index}`)];
return ( return (
<div className="flex flex-col items-center"> <div className="flex flex-col items-center">
@ -253,7 +254,7 @@ export default function MiiPage() {
{/* Submission name */} {/* Submission name */}
<h1 className="text-4xl font-extrabold wrap-break-word whitespace-break-spaces text-amber-700 flex-1 min-w-0">{mii.name}</h1> <h1 className="text-4xl font-extrabold wrap-break-word whitespace-break-spaces text-amber-700 flex-1 min-w-0">{mii.name}</h1>
{/* Like button */} {/* Like button */}
<LikeButton likes={mii._count.likedBy ?? 0} miiId={mii.id} isLiked={(mii.likedBy ?? []).length > 0} big /> <LikeButton likes={mii._count?.likedBy ?? 0} miiId={mii.id} isLiked={false} 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">