From dee4f8b9b940f599ef688b97fbe5b86c445ad037 Mon Sep 17 00:00:00 2001 From: Katiana Camacho-Villalon Date: Sat, 12 Dec 2020 03:58:59 -0800 Subject: [PATCH 1/4] removed infinite console logs --- src/components/App.js | 1 - src/components/Navbar.js | 3 --- 2 files changed, 4 deletions(-) diff --git a/src/components/App.js b/src/components/App.js index 90c5806..32e59b5 100644 --- a/src/components/App.js +++ b/src/components/App.js @@ -39,7 +39,6 @@ import { Elements } from "@stripe/react-stripe-js"; const App = () => { const [fetchId, setFetchId] = useState(null) - console.log("Here is the result of fetchId:", fetchId); const [ orders, setOrders ] = useState(getCurrentCart()); const [ token, setToken ] = useState(getCurrentToken()); const [ user, setUser ] = useState(getCurrentUser()) diff --git a/src/components/Navbar.js b/src/components/Navbar.js index b695f6b..2c7d581 100644 --- a/src/components/Navbar.js +++ b/src/components/Navbar.js @@ -32,7 +32,6 @@ const Navigation = (props) => { clearCurrentToken(); clearCurrentCart(); setOrders([]) - console.log("See Ya!", "You Have Succesfully Logged Out!", "success"); setUser({}); setToken(''); history.push('/users/login'); @@ -46,8 +45,6 @@ const Navigation = (props) => { } }, []); -{console.log("this is the user:", user)} - return
Codalorians From 9f6acfb36c690c5e8467fbd9c3446fa7615b32bf Mon Sep 17 00:00:00 2001 From: Katiana Camacho-Villalon Date: Sat, 12 Dec 2020 04:23:58 -0800 Subject: [PATCH 2/4] removed console logs --- src/api/index.js | 2 -- src/components/Board.js | 3 --- src/components/Cart.js | 2 +- src/components/Home.js | 2 -- src/components/ProductCard.js | 1 - 5 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 090b718..ec4cac7 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -112,7 +112,6 @@ export async function addProductToOrder(orderId, productId, price, quantity) { }; try { const { data } = await axios.post(`/api/orders/${orderId}/products`, bodyParameters); - console.log("addProductToOrder", data) return data; } catch (error) { throw error; @@ -141,7 +140,6 @@ export async function createProduct(name, description, price, inStock, imageURL, export async function destroyProduct(id) { try { const {data} = await axios.delete(`/api/products/${id}`) - console.log('The result of deleting:', data) return data } catch (error) { throw error; diff --git a/src/components/Board.js b/src/components/Board.js index ad20648..afeb395 100644 --- a/src/components/Board.js +++ b/src/components/Board.js @@ -21,8 +21,6 @@ const MainBoard = (props) => { async function fetchProducts(){ try{ const data = await getAllProducts() - console.log('data array ', data) - console.log('category ', categorysel) setProductRender(data) setFetchId(selectedId) }catch(error){ @@ -34,7 +32,6 @@ const MainBoard = (props) => { useEffect(() => { fetchProducts() },[]); - console.log('set render ',productRender) return <>
{user && user.isadmin ?