diff --git a/static/js/shop.jsx b/static/js/shop.jsx index dcdddb1..116160e 100644 --- a/static/js/shop.jsx +++ b/static/js/shop.jsx @@ -406,6 +406,7 @@ class ProductItem extends React.PureComponent { static get propTypes() { return { id: PropTypes.string.isRequired, + index: PropTypes.number.isRequired, name: PropTypes.string.isRequired, name_codename: PropTypes.string, price: PropTypes.number.isRequired, @@ -433,6 +434,7 @@ class ProductItem extends React.PureComponent { render() { const { id, + index, name, name_codename, price, @@ -482,7 +484,7 @@ class ProductItem extends React.PureComponent { - + {(provided, snapshot) => ( ({ name: groupItem.name, items: groupItem.itemIds.map(itemId => items[itemId]) })); - const groups = ordered_groups.map((group, g_index) => { + let item_index = -1; + const groups = ordered_groups.map((group, g_index) => { return ( @@ -1522,21 +1525,24 @@ class Backlog extends React.PureComponent { - {group.items.map(item => ( - - ))} + {group.items.map(item => { + item_index++; + return ( + + )})}