From 2993347dc71e9b4ff74840c6c44e9f3c00679213 Mon Sep 17 00:00:00 2001 From: daniel31x13 Date: Thu, 7 Nov 2024 02:09:56 -0500 Subject: [PATCH] sleeker dashboard items --- components/DashboardItem.tsx | 10 ++++++---- components/ui/Divider.tsx | 9 +++++++-- pages/dashboard.tsx | 3 ++- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/components/DashboardItem.tsx b/components/DashboardItem.tsx index efc1303..798f2b7 100644 --- a/components/DashboardItem.tsx +++ b/components/DashboardItem.tsx @@ -8,13 +8,15 @@ export default function dashboardItem({ icon: string; }) { return ( -
-
+
+
-

{name}

-

{value || 0}

+

{name}

+

+ {value || 0} +

); diff --git a/components/ui/Divider.tsx b/components/ui/Divider.tsx index 80f50d8..b3b2f62 100644 --- a/components/ui/Divider.tsx +++ b/components/ui/Divider.tsx @@ -3,10 +3,15 @@ import React from "react"; type Props = { className?: string; + vertical?: boolean; }; -function Divider({ className }: Props) { - return
; +function Divider({ className, vertical = false }: Props) { + return vertical ? ( +
+ ) : ( +
+ ); } export default Divider; diff --git a/pages/dashboard.tsx b/pages/dashboard.tsx index cbec492..d58ddc9 100644 --- a/pages/dashboard.tsx +++ b/pages/dashboard.tsx @@ -16,6 +16,7 @@ import { useTags } from "@/hooks/store/tags"; import { useDashboardData } from "@/hooks/store/dashboardData"; import Links from "@/components/LinkViews/Links"; import useLocalSettingsStore from "@/store/localSettings"; +import Divider from "@/components/ui/Divider"; export default function Dashboard() { const { t } = useTranslation(); @@ -112,7 +113,7 @@ export default function Dashboard() {
-
+