diff --git a/site/components/product/ProductView/ProductView.tsx b/site/components/product/ProductView/ProductView.tsx index de7c46b24..f7f985b8d 100644 --- a/site/components/product/ProductView/ProductView.tsx +++ b/site/components/product/ProductView/ProductView.tsx @@ -12,7 +12,7 @@ import ProductSidebar from '../ProductSidebar' import ProductTag from '../ProductTag' import ProductModel from '../ProductModel/ProductModel' import Lightbox from 'yet-another-react-lightbox' -import Zoom from "yet-another-react-lightbox/plugins/zoom"; +import Zoom from 'yet-another-react-lightbox/plugins/zoom' import 'yet-another-react-lightbox/styles.css' import { useRouter } from 'next/router' import random from 'lodash.random' @@ -30,10 +30,10 @@ const ProductView: FC = ({ product, relatedProducts }) => { }) const listPrice = usePrice({ - amount: (product.variants[0].listPrice) ? product.variants[0].listPrice : -1, - currencyCode: product.price.currencyCode!, + amount: product.variants[0].listPrice ? product.variants[0].listPrice : -1, + currencyCode: product.price.currencyCode!, }).price - + const model3dPath = product.media .map((media) => { return media.sources @@ -48,8 +48,10 @@ const ProductView: FC = ({ product, relatedProducts }) => { const { locale = 'it' } = useRouter() const colors = [random(255), random(255), random(255)] - const darkerColor = "rgba(" + colors[0] + ", " + colors[1] + ", " + colors[2] + ", 1)" - const lighterColor = "rgba(" + colors[0] + ", " + colors[1] + ", " + colors[2] + ", 0.8)" + const darkerColor = + 'rgba(' + colors[0] + ', ' + colors[1] + ', ' + colors[2] + ', 1)' + const lighterColor = + 'rgba(' + colors[0] + ', ' + colors[1] + ', ' + colors[2] + ', 0.8)' return ( <> @@ -59,11 +61,15 @@ const ProductView: FC = ({ product, relatedProducts }) => {
- + {product.images.map((image, i) => (
= ({ product, relatedProducts }) => {
- {locale === 'en' ? 'Related Products' : 'Prodotti Correlati'} + {locale === 'en' ? 'Latest Products' : 'Prodotti Recenti'}
{relatedProducts.map((p) => (