From 8ae02db304f8afdf8a28078fbad52a0a984c43b0 Mon Sep 17 00:00:00 2001 From: Maciej Gierada Date: Thu, 13 Jun 2024 17:41:17 +0200 Subject: [PATCH] debug ui not serving backend --- ui/src/components/CounterDisplay/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/src/components/CounterDisplay/index.js b/ui/src/components/CounterDisplay/index.js index 7d0db1c..072f2dc 100644 --- a/ui/src/components/CounterDisplay/index.js +++ b/ui/src/components/CounterDisplay/index.js @@ -4,8 +4,10 @@ const fetchCurrentValue = async () => { try { const rootUrl = process.env.ROOT_API_URL; const endpoint = `${rootUrl}/counter`; + console.log("Endpoint:", endpoint); const response = await axios.get(endpoint); + console.log("Response:", response.data); // Debug log if (response.data && typeof response.data.CurrentValue === "number") { return { currentValue: response.data.CurrentValue, error: null }; } else {