diff --git a/src/components/molecules/ShopLocationSwitcher.svelte b/src/components/molecules/ShopLocationSwitcher.svelte index ee27cdf..e56acbd 100644 --- a/src/components/molecules/ShopLocationSwitcher.svelte +++ b/src/components/molecules/ShopLocationSwitcher.svelte @@ -1,9 +1,9 @@ = writable(null) /** * Cart */ /** Cart open state */ -export const cartOpen = writable(false) +export const cartOpen: Writable = writable(false) /** Cart open state */ -export const cartId = writable(null) +export const cartId: Writable = writable(null) // Write to localStorage when changing cartId if (typeof localStorage !== 'undefined') { @@ -20,17 +26,18 @@ if (typeof localStorage !== 'undefined') { } /** Raw Cart data */ -export const cartData = writable(null) +export const cartData: Writable = writable(null) /** Cart data is being updated */ -export const cartIsUpdating = writable(false) +export const cartIsUpdating: Writable = writable(false) /** Amount of products present in cart */ -export const cartAmount = derived(cartData, ($cart) => { +export const cartAmount: Readable = derived(cartData, ($cart) => { return $cart && $cart.item_quantity > 0 ? $cart.item_quantity : 0 }) + /** * Notifications */ -export const cartNotifications = writable([]) \ No newline at end of file +export const cartNotifications: Writable = writable([]) \ No newline at end of file