🚧 Migrate to new SvelteKit routing system

A bit annoying but for the best I guess?
This commit is contained in:
2022-08-16 15:54:15 +02:00
parent cf2becc931
commit 5e5c08ddd1
40 changed files with 775 additions and 774 deletions

View File

@@ -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

View File

@@ -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)