add main_image field to product serializers and update components to use it

This commit is contained in:
Parsa Nazer
2026-01-06 14:10:48 +03:30
parent 0d1cd08521
commit 2fe7fa0005
4 changed files with 26 additions and 7 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ withDefaults(defineProps<Props>(), {
:id="product.id"
:slug="product.slug"
:title="product.name"
:picture="product.image ?? product.variants[0].images[0].image"
:picture="product.main_image"
:colors="product.colors"
:price="product.best_deal_price_before_discount"
:rate="product.rating"
@@ -91,7 +91,7 @@ const onSwiper = (swiper: SwiperClass) => {
:id="product.id"
:slug="product.slug"
:title="product.name"
:picture="product.image ?? product.variants[0].images[0].image"
:picture="product.main_image"
:colors="product.colors"
:rate="product.rating"
:dark-layer="true"