We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8469ef9 commit 73e9258Copy full SHA for 73e9258
modules/shopify/composables/useShopifyCart.ts
@@ -1,9 +1,8 @@
1
-const cart = ref<ShopifyCart>(undefined)
2
-const isCartOpen = ref(false)
3
-
4
export const useShopifyCart = () => {
+ const cart = useState<ShopifyCart>('cart', () => undefined)
+ const isCartOpen = useState('isCartOpen', () => false)
5
const nuxtApp = useNuxtApp()
6
- const loading = ref(false)
+ const loading = useState('loading', () => false)
7
const toast = useToast()
8
9
const getPriceWithCurrency = (price?: ShopifyPrice | null, quantity: number = 1) => {
0 commit comments