From 6cb8c351fc4018727986d730cf4bfdfc46999d03 Mon Sep 17 00:00:00 2001 From: Maciej Gierada Date: Thu, 13 Jun 2024 22:42:12 +0200 Subject: [PATCH] minor ui changes --- ui/src/app/page.js | 8 +------- ui/src/components/CounterDisplay/{index.js => index.jsx} | 6 +----- 2 files changed, 2 insertions(+), 12 deletions(-) rename ui/src/components/CounterDisplay/{index.js => index.jsx} (85%) diff --git a/ui/src/app/page.js b/ui/src/app/page.js index 5f85a48..f057107 100644 --- a/ui/src/app/page.js +++ b/ui/src/app/page.js @@ -3,13 +3,7 @@ import CounterDisplay from "@/components/CounterDisplay"; const Home = () => { return (
-
-

- A dashboard for monitoring custom ohno! events - {/*   */} - {/* src/app/page.js */} -

-
+
diff --git a/ui/src/components/CounterDisplay/index.js b/ui/src/components/CounterDisplay/index.jsx similarity index 85% rename from ui/src/components/CounterDisplay/index.js rename to ui/src/components/CounterDisplay/index.jsx index aeab366..1ba755f 100644 --- a/ui/src/components/CounterDisplay/index.js +++ b/ui/src/components/CounterDisplay/index.jsx @@ -3,13 +3,9 @@ import axios from "axios"; const fetchCurrentValue = async () => { try { const rootUrl = process.env.NEXT_PUBLIC_ROOT_API_URL; - console.log("rootUrl:", rootUrl); 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 { @@ -32,7 +28,7 @@ const CounterDisplay = async () => { ) : (

- Current streak: {currentValue} 🔥 + Current streak: {currentValue} days 🔥

)}