Skip to content
Snippets Groups Projects
Commit 35175018 authored by Princelle Maxime's avatar Princelle Maxime :gay_pride_flag:
Browse files

:art: remove logs

parent 06415530
Branches
1 merge request!7🔀 V1
...@@ -80,7 +80,7 @@ export async function addItem(name: string, price: number, priceAdherant: number ...@@ -80,7 +80,7 @@ export async function addItem(name: string, price: number, priceAdherant: number
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'apikey': APIKEY, 'apikey': APIKEY,
}}).then(({ data }) => { }}).then(({ data }) => {
console.log(data) //console.log(data)
return data; return data;
}) })
.catch(error => { .catch(error => {
......
...@@ -23,7 +23,7 @@ const AddProduct = () => { ...@@ -23,7 +23,7 @@ const AddProduct = () => {
if (category_id !== "n/a" && name !== "" && price > 0 && priceAdherant > 0 && stock > 0) { if (category_id !== "n/a" && name !== "" && price > 0 && priceAdherant > 0 && stock > 0) {
console.log("Creating item: " + name + " " + price + " " + priceAdherant + " " + stock + " " + category_id); console.log("Creating item: " + name + " " + price + " " + priceAdherant + " " + stock + " " + category_id);
addItem(name, price, priceAdherant, stock, category_id).then((data) => { addItem(name, price, priceAdherant, stock, category_id).then((data) => {
console.log(data); //console.log(data);
// Reset form data // Reset form data
setName(""); setName("");
...@@ -32,7 +32,7 @@ const AddProduct = () => { ...@@ -32,7 +32,7 @@ const AddProduct = () => {
setStock(0); setStock(0);
setCategory("n/a"); setCategory("n/a");
}).catch((_) => { }).catch((_) => {
console.log("Error"); console.log("Error on creating item");
}); });
} else { } else {
console.log("Please select a category"); console.log("Please select a category");
......
...@@ -22,7 +22,7 @@ const Users = () => { ...@@ -22,7 +22,7 @@ const Users = () => {
useEffect(() => { useEffect(() => {
// Fetch users from API // Fetch users from API
getUsers().then((users) => { getUsers().then((users) => {
console.log(users); //console.log(users);
setRawUsers(users); setRawUsers(users);
setUsersList(users); setUsersList(users);
}).catch((_) => { }).catch((_) => {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment