Skip to content

Commit

Permalink
debug ui not serving backend
Browse files Browse the repository at this point in the history
  • Loading branch information
mgierada committed Jun 13, 2024
1 parent c263058 commit 8ae02db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/src/components/CounterDisplay/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8ae02db

Please sign in to comment.