From 6452322c968f538ba8c37799eb1447b6c783dd44 Mon Sep 17 00:00:00 2001 From: Maciej Gierada Date: Sun, 16 Jun 2024 11:36:01 +0200 Subject: [PATCH] feat: get rid of card and simplify styling --- ui/src/app/page.js | 10 +++----- ui/src/components/Card/index.jsx | 27 ---------------------- ui/src/components/CounterDisplay/index.jsx | 5 ++-- 3 files changed, 6 insertions(+), 36 deletions(-) delete mode 100644 ui/src/components/Card/index.jsx diff --git a/ui/src/app/page.js b/ui/src/app/page.js index 83ee007..eafd075 100644 --- a/ui/src/app/page.js +++ b/ui/src/app/page.js @@ -1,6 +1,4 @@ -import axios from "axios"; import CounterDisplay from "@/components/CounterDisplay"; -import CounterCard from "@/components/Card"; /** * @typedef {Object} CounterApiResponse @@ -73,13 +71,11 @@ const Home = async () => { const data = await fetchCounter(); return ( -
-
- -
+
+
+
-
{/* */}
); }; diff --git a/ui/src/components/Card/index.jsx b/ui/src/components/Card/index.jsx deleted file mode 100644 index 96ebb35..0000000 --- a/ui/src/components/Card/index.jsx +++ /dev/null @@ -1,27 +0,0 @@ -import { - Card, - CardContent, - CardDescription, - CardFooter, - CardHeader, - CardTitle, -} from "@/components/ui/card"; - -const CounterCard = ({ currentValue, error }) => { - return ( - - - Card Title - Card Description - - -

Card Content

-
- -

Card Footer

-
-
- ); -}; - -export default CounterCard; diff --git a/ui/src/components/CounterDisplay/index.jsx b/ui/src/components/CounterDisplay/index.jsx index 7629d63..8885934 100644 --- a/ui/src/components/CounterDisplay/index.jsx +++ b/ui/src/components/CounterDisplay/index.jsx @@ -2,14 +2,15 @@ const CounterDisplay = ({ currentValue, error }) => { return ( -
+
{error ? (

{error}

) : (

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

)}