@hanzo/commerce 7.1.24 → 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.
|
@@ -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
|