From 35175018b01ff4c7c0113da11f3c29f523e16d89 Mon Sep 17 00:00:00 2001 From: Maxime Princelle <maxime@princelle.org> Date: Fri, 17 Dec 2021 14:47:11 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20remove=20logs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/back.ts | 2 +- src/pages/add_product.tsx | 4 ++-- src/pages/users.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apis/back.ts b/src/apis/back.ts index 96688eb..862b26d 100644 --- a/src/apis/back.ts +++ b/src/apis/back.ts @@ -80,7 +80,7 @@ export async function addItem(name: string, price: number, priceAdherant: number 'Content-Type': 'application/json', 'apikey': APIKEY, }}).then(({ data }) => { - console.log(data) + //console.log(data) return data; }) .catch(error => { diff --git a/src/pages/add_product.tsx b/src/pages/add_product.tsx index 5efaea5..ee68b95 100644 --- a/src/pages/add_product.tsx +++ b/src/pages/add_product.tsx @@ -23,7 +23,7 @@ const AddProduct = () => { if (category_id !== "n/a" && name !== "" && price > 0 && priceAdherant > 0 && stock > 0) { console.log("Creating item: " + name + " " + price + " " + priceAdherant + " " + stock + " " + category_id); addItem(name, price, priceAdherant, stock, category_id).then((data) => { - console.log(data); + //console.log(data); // Reset form data setName(""); @@ -32,7 +32,7 @@ const AddProduct = () => { setStock(0); setCategory("n/a"); }).catch((_) => { - console.log("Error"); + console.log("Error on creating item"); }); } else { console.log("Please select a category"); diff --git a/src/pages/users.tsx b/src/pages/users.tsx index cbf62ca..2eb6388 100644 --- a/src/pages/users.tsx +++ b/src/pages/users.tsx @@ -22,7 +22,7 @@ const Users = () => { useEffect(() => { // Fetch users from API getUsers().then((users) => { - console.log(users); + //console.log(users); setRawUsers(users); setUsersList(users); }).catch((_) => { -- GitLab