🚧 Migrate to new SvelteKit routing system
A bit annoying but for the best I guess?
This commit is contained in:
@@ -4,7 +4,7 @@ import { cartNotifications } from '$utils/stores/shop'
|
||||
/**
|
||||
* Add a notification
|
||||
*/
|
||||
export const addNotification = (notification: Notification) => {
|
||||
export const addNotification = (notification: ShopNotification) => {
|
||||
const id = Math.floor(Math.random() * 10000)
|
||||
|
||||
// Add ID and default timeout
|
||||
|
||||
@@ -2,7 +2,6 @@ import { addNotification } from '$utils/functions/notifications'
|
||||
import { cartData } from '$utils/stores/shop'
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Add a product to a cart
|
||||
*/
|
||||
@@ -17,6 +16,7 @@ export const addToCart = async (cartId: string, product: any, quantity: number =
|
||||
quantity,
|
||||
})
|
||||
})
|
||||
|
||||
if (updatedCart.ok) {
|
||||
const newCart = await updatedCart.json()
|
||||
cartData.set(newCart)
|
||||
|
||||
Reference in New Issue
Block a user