From 50d8c3d91de7c72c91c65f0aa54ae698f470268c Mon Sep 17 00:00:00 2001 From: Jonah Pflaster Date: Fri, 18 Oct 2024 14:33:26 -0400 Subject: [PATCH 1/6] statscard started --- src/app/page.tsx | 5 ++--- src/components/StatsCard.tsx | 11 +++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 src/components/StatsCard.tsx diff --git a/src/app/page.tsx b/src/app/page.tsx index 254069d..20facd4 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,12 +1,11 @@ "use client"; -import ExampleButton from "@components/ExampleButton"; +import StatsCard from "@components/StatsCard"; export default function Home() { return (
- {/* Example Button (ExampleButton.tsx in components folder) */} - +
); } diff --git a/src/components/StatsCard.tsx b/src/components/StatsCard.tsx new file mode 100644 index 0000000..847276e --- /dev/null +++ b/src/components/StatsCard.tsx @@ -0,0 +1,11 @@ +const StatsCard = () => { + return ( +
+
+

Total Volunteers

+
+
+ ); +}; + +export default StatsCard; From 4973b8f3a875ce66ff2654cf2a4ed3562a352145 Mon Sep 17 00:00:00 2001 From: Jonah Pflaster Date: Fri, 18 Oct 2024 20:46:52 -0400 Subject: [PATCH 2/6] added the 4 main variables for the card --- src/app/page.tsx | 7 ++++++- src/components/StatsCard.tsx | 23 +++++++++++++++++++---- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 20facd4..47a349e 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -5,7 +5,12 @@ import StatsCard from "@components/StatsCard"; export default function Home() { return (
- +
); } diff --git a/src/components/StatsCard.tsx b/src/components/StatsCard.tsx index 847276e..ab42156 100644 --- a/src/components/StatsCard.tsx +++ b/src/components/StatsCard.tsx @@ -1,8 +1,23 @@ -const StatsCard = () => { +import React from 'react'; +import { Icon } from "@iconify/react/dist/iconify.js"; + +interface StatsCardProps { + heading: string; + value: number | string; + date: string; + icon: string; +} + +const StatsCard = ({ heading, value, icon, date }: StatsCardProps) => { return ( -
-
-

Total Volunteers

+
+
+

{heading}

+

{value}

+
+ +
+

{date}

); From abb61a475f630a8737c2533007692a7e248fe99e Mon Sep 17 00:00:00 2001 From: Jonah Pflaster Date: Sun, 20 Oct 2024 21:15:27 -0400 Subject: [PATCH 3/6] worked on formatting statscard --- src/components/StatsCard.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/StatsCard.tsx b/src/components/StatsCard.tsx index ab42156..cf107c3 100644 --- a/src/components/StatsCard.tsx +++ b/src/components/StatsCard.tsx @@ -10,15 +10,15 @@ interface StatsCardProps { const StatsCard = ({ heading, value, icon, date }: StatsCardProps) => { return ( -
-
-

{heading}

-

{value}

-
- -
-

{date}

+
+
+

{heading}

+

{value}

+
+
+

{date}

+
); }; From ebe558ae21729c71b815f3e7c4c361331c5f728f Mon Sep 17 00:00:00 2001 From: Jonah Pflaster Date: Fri, 25 Oct 2024 14:28:33 -0400 Subject: [PATCH 4/6] Finished Statscard (however still needs correct font) --- src/app/page.tsx | 14 +++++++++++++- src/components/StatsCard.tsx | 29 +++++++++++++++++++++-------- 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 47a349e..96f8667 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -6,11 +6,23 @@ export default function Home() { return (
+ +
); } diff --git a/src/components/StatsCard.tsx b/src/components/StatsCard.tsx index cf107c3..20d0997 100644 --- a/src/components/StatsCard.tsx +++ b/src/components/StatsCard.tsx @@ -10,17 +10,30 @@ interface StatsCardProps { const StatsCard = ({ heading, value, icon, date }: StatsCardProps) => { return ( -
-
-

{heading}

-

{value}

-
- +
+
+
+
+
{heading}
+
+
+
+
{value}
+
+
{date}
+
+
+
-

{date}

-
+
+ +
+
+ ); }; export default StatsCard; + + From cc167ec85319693b16ced20231cd1de167145af2 Mon Sep 17 00:00:00 2001 From: wkim10 Date: Sun, 27 Oct 2024 14:46:40 -0400 Subject: [PATCH 5/6] small prettier change --- src/app/page.tsx | 24 +++++++++++------------ src/components/StatsCard.tsx | 37 +++++++++++++++++++++--------------- 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 96f8667..d208833 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -6,22 +6,22 @@ export default function Home() { return (
); diff --git a/src/components/StatsCard.tsx b/src/components/StatsCard.tsx index 20d0997..d4db323 100644 --- a/src/components/StatsCard.tsx +++ b/src/components/StatsCard.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React from "react"; import { Icon } from "@iconify/react/dist/iconify.js"; interface StatsCardProps { @@ -11,29 +11,36 @@ interface StatsCardProps { const StatsCard = ({ heading, value, icon, date }: StatsCardProps) => { return (
-
+
-
-
{heading}
+
+
+ {heading}
-
-
-
{value}
-
-
{date}
-
+
+
+
+
+ {value} +
+
+
+ {date}
+
+
- +
+
-
- ); }; export default StatsCard; - - From efbfd77bf4abc225d4baeea99d77722d2c8a325f Mon Sep 17 00:00:00 2001 From: Jonah Pflaster Date: Sun, 27 Oct 2024 20:25:22 -0400 Subject: [PATCH 6/6] Finally fully functioning statscard! --- src/app/page.tsx | 20 +------------------- src/components/StatsCard.tsx | 2 +- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 96f8667..7a8ce47 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,28 +1,10 @@ "use client"; -import StatsCard from "@components/StatsCard"; export default function Home() { return (
- - - +
); } diff --git a/src/components/StatsCard.tsx b/src/components/StatsCard.tsx index 20d0997..6600e4b 100644 --- a/src/components/StatsCard.tsx +++ b/src/components/StatsCard.tsx @@ -10,7 +10,7 @@ interface StatsCardProps { const StatsCard = ({ heading, value, icon, date }: StatsCardProps) => { return ( -
+