feat: custom mii images and refactor submit route

This commit is contained in:
trafficlunar 2025-04-07 20:20:23 +01:00
parent 45fb0c07a7
commit 1e0132990a
8 changed files with 226 additions and 103 deletions

View file

@ -43,7 +43,11 @@ export default async function MiiPage({ params }: Props) {
if (!mii) redirect("/404");
const images = [`/mii/${mii.id}/mii.webp`, `/mii/${mii.id}/qr-code.webp`, ...mii.images];
const images = [
`/mii/${mii.id}/mii.webp`,
`/mii/${mii.id}/qr-code.webp`,
...Array.from({ length: mii.imageCount }, (_, index) => `/mii/${mii.id}/image${index}.webp`),
];
return (
<div>