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 26 | 5x 30x 3x | import React from 'react'; import ProductDetails from './ProductDetails'; import ProductImages from './ProductImages'; import SimilarProducts from '../SimilarProducts/SimilarProducts' import loadingIndicator from '../../Images/loading-indicator-main.jpeg'; export default function ProductDetailsPage({ categoryResult, match }) { return ( <React.Fragment> {categoryResult.groups ? categoryResult.groups.filter(item => item.id === match.params.id).map((product, index) => { return ( <React.Fragment key={index} > <div className="grid-x grid-padding-x small-up-1 medium-up-2 large-up-2"> <ProductImages product={product} /> <ProductDetails product={product} /> </div> <SimilarProducts categoryResult={categoryResult} /> </React.Fragment>) }) : <img className="loading-indicator" src={loadingIndicator}></img>} </React.Fragment> ) } |