Skip to content

Commit

Permalink
Fix images counting bug (#62)
Browse files Browse the repository at this point in the history
* Fix images counting bug

* Rebase develop
  • Loading branch information
ProgrammerDATCH authored Aug 2, 2024
1 parent 6ddaf9a commit 981929d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/product/SellerProduct.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,12 @@ const SellerProduct = ({ productId }: { productId: string }) => {

if(isAdd && (!updatedProduct.name || !updatedProduct.description || !updatedProduct.price || !updatedProduct.bonus || !updatedProduct.discount || !updatedProduct.category || !updatedProduct.expiryDate || !updatedProduct.quantity)){
toast.error('Fill all fields please')
return;
}
if(isAdd && setUpdateImages.length < 4){
if(isAdd && updateImages.length < 4){
toast.error(updateImages.length)
toast.error('Upload atleast 4 images please')
return;
}

if (isImagesUpdated) {
Expand Down

0 comments on commit 981929d

Please sign in to comment.