Skip to content

Commit

Permalink
fix(product-single): fixes after CR
Browse files Browse the repository at this point in the history
  • Loading branch information
Maciej Kucmus committed Nov 5, 2019
1 parent f885054 commit 0263626
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test-page/src/views/Category.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"
:regular-price="product.calculatedPrice.unitPrice"
:isOnWishlist="false"
@click:wishlist="$router.push({name: 'product', params: {id: product.id}})"
@click:wishlist="toggleWishlist(i)"
class="products__product-card"
/>
</div>
Expand Down
14 changes: 7 additions & 7 deletions test-page/src/views/Product.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
:regular="`$${price}`"
class="sf-price--big product-details__sub-price"
/>
<div class="product-details__sub-rating" v-if="reviews.length > 0">
<div class="product-details__sub-rating" v-if="reviews.length">
<SfRating :score="ratingAverage" :max="5" />
<div class="product-details__sub-reviews desktop-only">
Read all {{ reviews.length }} review
Expand Down Expand Up @@ -120,11 +120,11 @@
/>
</div>
</SfTab>
<SfTab title="Read reviews" v-if="reviews.length > 0">
<SfTab title="Read reviews" v-if="reviews.length">
<SfReview
class="product-details__review"
v-for="(review, i) in reviews"
:key="i"
v-for="review in reviews"
:key="review.id"
:author="review.externalUser ? review.externalUser : review.customerId"
:date="review.createdAt"
:message="review.content"
Expand All @@ -148,7 +148,7 @@
</div>
<SfSection title-heading="Match it with" class="section">
<SfCarousel class="product-carousel">
<SfCarouselItem v-for="(product, i) in products" :key="i">
<SfCarouselItem v-for="(product, i) in relatedProducts" :key="i">
<SfProductCard
:title="product.title"
:image="product.image"
Expand All @@ -164,7 +164,7 @@
</SfSection>
<SfSection title-heading="You might also like" class="section">
<SfCarousel class="product-carousel">
<SfCarouselItem v-for="(product, i) in products" :key="i">
<SfCarouselItem v-for="(product, i) in relatedProducts" :key="i">
<SfProductCard
:title="product.title"
:image="product.image"
Expand Down Expand Up @@ -309,7 +309,7 @@ export default {
qty: "1",
selectedColor: null,
selectedSize: null,
products: [
relatedProducts: [
{
title: "Cream Beach Bag",
image: "assets/storybook/homepage/productA.jpg",
Expand Down

0 comments on commit 0263626

Please sign in to comment.