@hanzo/commerce 7.1.22 → 7.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,7 @@ import type { LineItem } from '../../../types'
10
10
  import { formatCurrencyValue } from '../../../util'
11
11
  import AddToCartWidget from '../../add-to-cart-widget'
12
12
  import { useCommerce } from '../../../context'
13
+ import { computed } from 'mobx'
13
14
 
14
15
  const DEF_IMG_SIZE=40
15
16
 
@@ -34,12 +35,14 @@ const CartLineItem: React.FC<{
34
35
  imgSizePx=DEF_IMG_SIZE,
35
36
  showPromoCode=false,
36
37
  itemClicked,
37
- selected=false
38
+ //selected=false
38
39
  }) => {
39
40
 
40
41
  const cmmc = useCommerce()
41
42
  const promoPrice = showPromoCode ? cmmc.itemPromoPrice(item) : undefined
42
43
 
44
+ const selected = item.sku === cmmc.currentItem?.sku
45
+
43
46
  return (
44
47
  <div
45
48
  className={cn(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/commerce",
3
- "version": "7.1.22",
3
+ "version": "7.1.24",
4
4
  "description": "e-commerce framework.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",