From 8dca5acee0cc463849d6eadc68f698dc0b8145cf Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Wed, 8 May 2024 16:53:37 +0000 Subject: [PATCH] style: format code with Prettier This commit fixes the style issues introduced in a1dfcd3 according to the output from Prettier. Details: None --- front/src/lib/cart.ts | 9 +++++---- front/src/lib/test-api.ts | 2 +- front/src/lib/test-data.ts | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/front/src/lib/cart.ts b/front/src/lib/cart.ts index 7e3314d..0d98c37 100644 --- a/front/src/lib/cart.ts +++ b/front/src/lib/cart.ts @@ -17,7 +17,8 @@ function createCartStore() { } try { - const newData: Record = await postVerifyCart(localData); + const newData: Record = + await postVerifyCart(localData); cart.set(newData); } catch (error) { console.error("Could not load basket:", error); @@ -28,7 +29,7 @@ function createCartStore() { async function addToCart(uuid: string, amount: number) { if (!loaded) { - return + return; } if (get(cart)[uuid] !== undefined) { @@ -83,7 +84,7 @@ function createCartStore() { function removeByUUID(uuid: string) { if (!loaded) { - return + return; } cart.update((cart) => { @@ -106,7 +107,7 @@ function createCartStore() { // Create store const Cart = createCartStore(); -export let cartLoaded = Cart.init() +export let cartLoaded = Cart.init(); // Make sure to update localstorage on any changes Cart.subscribe((value) => { diff --git a/front/src/lib/test-api.ts b/front/src/lib/test-api.ts index b840970..c495eb8 100644 --- a/front/src/lib/test-api.ts +++ b/front/src/lib/test-api.ts @@ -139,5 +139,5 @@ export async function postVerifyCart( }); await fakeDelay(1); - return newCartData + return newCartData; } diff --git a/front/src/lib/test-data.ts b/front/src/lib/test-data.ts index eceb1f7..95646fb 100644 --- a/front/src/lib/test-data.ts +++ b/front/src/lib/test-data.ts @@ -74,7 +74,7 @@ Contains the following: - melon `, labels: [Labels.nut, Labels.gluten, Labels.spicy, Labels.fish], - images: ["/item_images/wathog.jpg","/item_images/sonichog.jpg"], + images: ["/item_images/wathog.jpg", "/item_images/sonichog.jpg"], }, { uuid: "bluhog",