@hanzo/commerce 7.1.23 → 7.1.25

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.
@@ -41,7 +41,7 @@ const CartLineItem: React.FC<{
41
41
  const cmmc = useCommerce()
42
42
  const promoPrice = showPromoCode ? cmmc.itemPromoPrice(item) : undefined
43
43
 
44
- const selected = computed(() => (item.sku === cmmc.currentItem?.sku))
44
+ const selected = item.sku === cmmc.currentItem?.sku
45
45
 
46
46
  return (
47
47
  <div
@@ -12,7 +12,7 @@ import CartLineItem from './cart-line-item'
12
12
  import TotalArea from './total-area'
13
13
 
14
14
  import type { LineItem } from '../../../types'
15
- import { reaction } from 'mobx'
15
+ import { autorun, reaction } from 'mobx'
16
16
 
17
17
  const CartPanel: React.FC<PropsWithChildren & {
18
18
  /** fix size and scroll after 'scrollAfter items in teh cart. */
@@ -57,6 +57,10 @@ const CartPanel: React.FC<PropsWithChildren & {
57
57
  if (!cmmc.cartEmpty && !cmmc.currentItem) {
58
58
  cmmc.setCurrentItem(cmmc.cartItems[0].sku)
59
59
  }
60
+
61
+ autorun(() => {
62
+ console.log('AUTORUN: ' + cmmc.currentItem?.sku)
63
+ })
60
64
  // return mobx disposer
61
65
  return reaction(() => (
62
66
  cmmc.cartItems.length
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/commerce",
3
- "version": "7.1.23",
3
+ "version": "7.1.25",
4
4
  "description": "e-commerce framework.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",