Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 5x 5x 50x 20x | /* eslint-disable arrow-body-style */
/* eslint-disable react/no-array-index-key */
/* eslint-disable react/prop-types */
/* eslint-disable max-len */
import React from 'react';
import ProductThumbnail from '../ProductThumbnail/ProductThumbnail';
export default function SimilarProducts({ categoryResult }) {
const similarProducts = categoryResult.groups;
return (
<div className="similar-products-section">
<div className="grid-x grid-padding-x small-up-1 medium-up-1 large-up-1">
<h5 className="subheader primary">Similar Products</h5>
</div>
<div className="grid-x grid-padding-x small-up-1 medium-up-3 large-up-4">
{similarProducts ? similarProducts.filter((item, index) => index < 4)
.map((item, index) => {
return <ProductThumbnail key={index} product={item} />;
}) : <div>Similar Product not found</div>}
</div>
</div>
);
}
|