From f1183db1bafef2acfa67a13215e9d046a3889c7f Mon Sep 17 00:00:00 2001 From: THIS ONE IS A LITTLE BIT TRICKY KRUB Date: Sun, 19 Nov 2023 19:01:59 +0700 Subject: [PATCH] Constructing dashboard. --- frontend/src/App.jsx | 2 +- frontend/src/components/dashboard/KpiCard.jsx | 21 +++++++++++ .../components/{ => dashboard}/dashboard.jsx | 36 +++++++++---------- 3 files changed, 38 insertions(+), 21 deletions(-) create mode 100644 frontend/src/components/dashboard/KpiCard.jsx rename frontend/src/components/{ => dashboard}/dashboard.jsx (68%) diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index eb6bb03..28d2d19 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -12,7 +12,7 @@ import IconSideNav from "./components/navigations/IconSideNav"; import Eisenhower from "./components/eisenhowerMatrix/Eisenhower"; import PrivateRoute from "./PrivateRoute"; import ProfileUpdatePage from "./components/profilePage"; -import Dashboard from "./components/dashboard"; +import Dashboard from "./components/dashboard/dashboard"; const App = () => { diff --git a/frontend/src/components/dashboard/KpiCard.jsx b/frontend/src/components/dashboard/KpiCard.jsx new file mode 100644 index 0000000..08d7a99 --- /dev/null +++ b/frontend/src/components/dashboard/KpiCard.jsx @@ -0,0 +1,21 @@ + +import { BadgeDelta, Card, Flex, Metric, ProgressBar, Text } from "@tremor/react"; + +export default function KpiCard() { + return ( + + +
+ Sales + $ 12,699 +
+ 13.2% +
+ + 68% ($ 149,940) + $ 220,500 + + +
+ ); +} \ No newline at end of file diff --git a/frontend/src/components/dashboard.jsx b/frontend/src/components/dashboard/dashboard.jsx similarity index 68% rename from frontend/src/components/dashboard.jsx rename to frontend/src/components/dashboard/dashboard.jsx index dea56a9..9cefbe2 100644 --- a/frontend/src/components/dashboard.jsx +++ b/frontend/src/components/dashboard/dashboard.jsx @@ -1,22 +1,21 @@ -"use client"; +import { + Card, + Grid, + Tab, + TabGroup, + TabList, + TabPanel, + TabPanels, + Text, + Title, +} from "@tremor/react"; +import KpiCard from "./kpiCard"; - import { - Card, - Grid, - Tab, - TabGroup, - TabList, - TabPanel, - TabPanels, - Text, - Title, - } from "@tremor/react"; - -export default function DashboardExample() { +export default function Dashboard() { return (
Dashboard - Lorem ipsum dolor sit amet, consetetur sadipscing elitr. + All of your progress will be shown right here. @@ -26,10 +25,7 @@ export default function DashboardExample() { - - {/* Placeholder to set height */} -
- + {/* Placeholder to set height */}
@@ -56,4 +52,4 @@ export default function DashboardExample() {
); -} \ No newline at end of file +}