From 7b4cbef983f26b56f14bc8f835f9de4dfd4073ec Mon Sep 17 00:00:00 2001 From: Fluffy-Bean Date: Sat, 4 May 2024 16:54:19 +0100 Subject: [PATCH] FUCK --- front/src/lib/cart.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/front/src/lib/cart.ts b/front/src/lib/cart.ts index 5820c44..fe3728a 100644 --- a/front/src/lib/cart.ts +++ b/front/src/lib/cart.ts @@ -25,7 +25,7 @@ function createCartStore() { async function addToCart(uuid: string, amount: number) { if (get(cart)[uuid] !== undefined) { cart.update((cart: Record) => { - cart[uuid].amount += amount; // skipcq: JS-0320 + cart[uuid].amount += amount; return cart; }); } else { @@ -63,7 +63,7 @@ function createCartStore() { } function getTotalPrice(): number { - let totalCartPrice: number = 0; + let totalCartPrice = 0; Object.values(get(cart)).forEach((item: CartItem) => { totalCartPrice += item.amount * item.data.price; }); @@ -72,7 +72,7 @@ function createCartStore() { function removeByUUID(uuid: string) { cart.update((cart) => { - delete cart[uuid]; + delete cart[uuid]; // skipcq: JS-0320 return cart; }); }