You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think, product.imageUrl in src\views\admin\components\ProductForm.jsx should be product.image.
After changing onSubmitForm as below, it works fine for me.
constonSubmitForm=(form)=>{if(imageFile.image.file||product.imageUrl){// oldif(imageFile.image.file||product.image){// newonSubmit({
...form,quantity: 1,// due to firebase function billing policy, let's add lowercase version// of name here instead in firebase functionsname_lower: form.name.toLowerCase(),dateAdded: newDate().getTime(),image: imageFile?.image?.file||product.imageUrl,// oldimage: imageFile?.image?.file||product.image,// newimageCollection: imageFile.imageCollection});}else{// eslint-disable-next-line no-alertalert('Product thumbnail image is required.');}};
Hi Julius,
First of all, thanks alot for this wonderful e-commerce app and making it available to community for free.. :-)
Now to the issue.
From admin view, when I try to edit a product and submit the changes, I always get this message 'Product thumbnail image is required.'
I can see the thumbnail is loaded in the edit view, but somehow submit doesnt work without reuploading the thumbnail using 'choose image' button.
This is not as we may not be having the thumbnail copy of the product image all the time.
The text was updated successfully, but these errors were encountered: