Skip to content

Commit

Permalink
removed logs from client
Browse files Browse the repository at this point in the history
  • Loading branch information
victorchrollo14 committed Jan 22, 2024
1 parent 23d63e3 commit 8197d10
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions client/src/components/Github.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const GithubButton = ({ name, setError, setSuccess }) => {

const redirectAuth = () => {
const CLIENT_ID = import.meta.env.VITE_CLIENT_ID;
console.log(CLIENT_ID);
// console.log(CLIENT_ID);
window.location.assign(
`https://github.com/login/oauth/authorize?client_id=${CLIENT_ID}`
);
Expand Down Expand Up @@ -44,7 +44,7 @@ const GithubButton = ({ name, setError, setSuccess }) => {
}
}
} catch (error) {
console.log(error);
// console.log(error);
}
};

Expand Down
4 changes: 2 additions & 2 deletions client/src/contexts/cartContext.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ const CartContextProvider = ({ children }) => {
const cartData = getCartData(data);
setCart(cartData);
} catch (error) {
console.log(error);
// console.log(error);
}
};

useEffect(() => {
if (token && user && products) {
console.log(token, user);
// console.log(token, user);
fetchCart();
}
}, [token, user, products]);
Expand Down
2 changes: 1 addition & 1 deletion client/src/contexts/productContext.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const ProductContextProvider = (props) => {
setProducts(data);
setCategory();
} catch (err) {
console.log(err);
// console.log(err);
}
};
fetchProductData();
Expand Down
2 changes: 1 addition & 1 deletion client/src/contexts/userContext.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const UserContextProvider = (props) => {
const data = await response.json();
setUser(data);
} catch (error) {
console.log(error);
// console.log(error);
}
};
if (token) {
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/cart/Cart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const Cart = () => {
alert(data.error);
}
} catch (err) {
console.log(err);
// console.log(err);
}
};

Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/cart/CartProduct.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const CartProduct = ({ item, setCart, cart, setConfirmModal, deleteID }) => {
alert(data.error);
}
} catch (err) {
console.log(err);
// console.log(err);
}
};

Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/checkout/Payment/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const Card = () => {

const cardDetails = (e) => {
setCard({ ...card, [e.target.name]: e.target.value })
console.log(card)
// console.log(card)
}

return (
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/checkout/Shipping.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Shipping = () => {
}
const shippingDetails = (e) => {
setAddress({ ...address, [e.target.name]: e.target.value })
console.log(address)
// console.log(address)
}
return (
<>
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/product/AddCart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const AddCart = ({ productID, setQuantity, size, quantity }) => {
}
}
} catch (error) {
console.log(error);
// console.log(error);
}
};

Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/shop/Shop.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const ShopPage = () => {
return a.price - b.price;
});
}
console.log(sortedCategories);
// console.log(sortedCategories);
setAllCategories(sortedCategories);
};

Expand Down
6 changes: 3 additions & 3 deletions client/src/services/auth.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const register = async (userData) => {
});
return response;
} catch (error) {
console.log(error);
// console.log(error);
}
};

Expand All @@ -29,7 +29,7 @@ const login = async (userData, setLoggedIn, setToken) => {

return { status: response.status, data: data };
} catch (error) {
console.log(error);
// console.log(error);
}
};

Expand All @@ -38,7 +38,7 @@ const logout = async () => {
localStorage.removeItem("token");
return true;
} catch (error) {
console.log(error);
// console.log(error);
}
};

Expand Down

0 comments on commit 8197d10

Please sign in to comment.