Add some keys to elements

This commit is contained in:
claudiulodro 2018-06-04 10:48:48 -07:00
parent 59cba2a952
commit 07e249faae
3 changed files with 4 additions and 4 deletions

View File

@ -552,7 +552,7 @@ var ProductPreview = function (_React$Component4) {
return wp.element.createElement(
'div',
{ className: 'product-preview' },
{ className: 'product-preview', key: product.id + '-preview' },
image,
wp.element.createElement(
'div',
@ -1802,7 +1802,7 @@ var ProductSpecificSelectedProducts = withAPIData(function (props) {
productElements.push(wp.element.createElement(
'li',
{ className: 'wc-products-list-card__item' },
{ className: 'wc-products-list-card__item', key: productData.id + '-specific-select-edit' },
wp.element.createElement(
'div',
{ className: 'wc-products-list-card__content' },

View File

@ -340,7 +340,7 @@ class ProductPreview extends React.Component {
}
return (
<div className="product-preview">
<div className="product-preview" key={ product.id + '-preview' } >
{ image }
<div className="product-title">{ product.name }</div>
<div className="product-price" dangerouslySetInnerHTML={ { __html: product.price_html } } />

View File

@ -337,7 +337,7 @@ const ProductSpecificSelectedProducts = withAPIData( ( props ) => {
const productData = PRODUCT_DATA[ productId ];
productElements.push(
<li className="wc-products-list-card__item">
<li className="wc-products-list-card__item" key={ productData.id + '-specific-select-edit' } >
<div className="wc-products-list-card__content">
<img src={ productData.images[0].src } />
<span className="wc-products-list-card__content-item-name">{ productData.name }</span>