Fix: Remove encType from product edit form with Server Action

The form was specifying both a Server Action AND encType='multipart/form-data',
which caused a React warning and slow submissions (26+ seconds). Next.js
automatically handles encoding for Server Actions, so encType should not be
specified. Submission now completes in ~3 seconds.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Andymick
2026-07-19 11:47:09 +01:00
co-authored by Claude Haiku 4.5
parent 9c7999b8d7
commit 7fa324bc07
+1 -1
View File
@@ -29,7 +29,7 @@ export default async function EditProductPage({ params }: { params: { id: string
Changes apply immediately to the live product at /made-to-order/{product.slug}. Changes apply immediately to the live product at /made-to-order/{product.slug}.
</p> </p>
<form action={updateProduct} className="mt-10 space-y-6" encType="multipart/form-data"> <form action={updateProduct} className="mt-10 space-y-6">
<input type="hidden" name="id" value={product.id} /> <input type="hidden" name="id" value={product.id} />
<div> <div>