mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-05-13 13:17:45 +00:00
fix: use <div> instead of <form> in submit and edit pages
the buttons refresh the page and it's annoying to keep writing type="button"
This commit is contained in:
parent
94140e74f9
commit
8673eb17e9
2 changed files with 5 additions and 5 deletions
|
|
@ -189,7 +189,7 @@ export default function EditForm({ mii, likes }: Props) {
|
||||||
}, [mii.id, mii.imageCount]);
|
}, [mii.id, mii.imageCount]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<form className="flex justify-center gap-4 w-full max-lg:flex-col max-lg:items-center">
|
<div className="flex justify-center gap-4 w-full max-lg:flex-col max-lg:items-center">
|
||||||
<div className="flex justify-center">
|
<div className="flex justify-center">
|
||||||
<div className="w-75 h-min flex flex-col bg-zinc-50 rounded-3xl border-2 border-zinc-300 shadow-lg p-3">
|
<div className="w-75 h-min flex flex-col bg-zinc-50 rounded-3xl border-2 border-zinc-300 shadow-lg p-3">
|
||||||
<Carousel
|
<Carousel
|
||||||
|
|
@ -453,6 +453,6 @@ export default function EditForm({ mii, likes }: Props) {
|
||||||
<SubmitButton onClick={handleSubmit} text="Edit" className="ml-auto" />
|
<SubmitButton onClick={handleSubmit} text="Edit" className="ml-auto" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ export default function SubmitForm({ inQueueMiisCount }: Props) {
|
||||||
formData.append("name", name);
|
formData.append("name", name);
|
||||||
formData.append("tags", JSON.stringify(tags));
|
formData.append("tags", JSON.stringify(tags));
|
||||||
formData.append("description", description);
|
formData.append("description", description);
|
||||||
formData.append("youtubeId", youtubeId);
|
formData.append("youtubeId", youtubeId);
|
||||||
files.forEach((file, index) => {
|
files.forEach((file, index) => {
|
||||||
// image1, image2, etc.
|
// image1, image2, etc.
|
||||||
formData.append(`image${index + 1}`, file);
|
formData.append(`image${index + 1}`, file);
|
||||||
|
|
@ -167,7 +167,7 @@ export default function SubmitForm({ inQueueMiisCount }: Props) {
|
||||||
}, [qrBytesRaw, platform]);
|
}, [qrBytesRaw, platform]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<form className="flex justify-center gap-4 w-full max-lg:flex-col max-lg:items-center">
|
<div className="flex justify-center gap-4 w-full max-lg:flex-col max-lg:items-center">
|
||||||
<div className="flex justify-center">
|
<div className="flex justify-center">
|
||||||
<div className="w-75 h-min flex flex-col bg-zinc-50 rounded-3xl border-2 border-zinc-300 shadow-lg p-3">
|
<div className="w-75 h-min flex flex-col bg-zinc-50 rounded-3xl border-2 border-zinc-300 shadow-lg p-3">
|
||||||
<Carousel
|
<Carousel
|
||||||
|
|
@ -541,6 +541,6 @@ export default function SubmitForm({ inQueueMiisCount }: Props) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue