From a4bddb0ab306ace383ab3e190a3f2182caea4185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Thu, 26 Oct 2023 13:06:04 +0100 Subject: [PATCH] console.log --- web/src/context/software.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/src/context/software.jsx b/web/src/context/software.jsx index 2d41ab0d56..36b4c09566 100644 --- a/web/src/context/software.jsx +++ b/web/src/context/software.jsx @@ -44,15 +44,18 @@ function SoftwareProvider({ children }) { console.log("Loading products"); loadProducts().catch(console.error); } + console.log("Refreshing the software provider"); }, [client, setProducts, setSelectedId, cancellablePromise]); useEffect(() => { if (!client) return; + console.log("Listening for product changes"); return client.software.onProductChange(setSelectedId); }, [client, setSelectedId]); const value = [products, selectedId]; + console.log("Injecting the value", value, "in the "); return {children}; } @@ -63,6 +66,7 @@ function useSoftware() { throw new Error("useSoftware must be used within a SoftwareProvider"); } + console.log("Retrieving software value", context); const [products, selectedId] = context; let selectedProduct = selectedId;