From ccfb5973425af5ec724c1ca634aa145a2ce70336 Mon Sep 17 00:00:00 2001 From: Vishesh 'ironeagle' Bangotra Date: Mon, 18 May 2026 08:14:14 +0530 Subject: [PATCH] minor configration cleanups --- src/components/Dashboard/Dashboard.view.tsx | 8 -- .../LatestItems/LatestItems.models.ts | 1 + src/components/LatestItems/LatestItems.tsx | 3 + .../LatestItems/LatestItems.view.tsx | 3 +- src/components/ProgressCard/TopTags.tsx | 81 ++++++++++++------- src/dashboard-config.ts | 1 + 6 files changed, 58 insertions(+), 39 deletions(-) diff --git a/src/components/Dashboard/Dashboard.view.tsx b/src/components/Dashboard/Dashboard.view.tsx index 7b9771b..1b7c232 100644 --- a/src/components/Dashboard/Dashboard.view.tsx +++ b/src/components/Dashboard/Dashboard.view.tsx @@ -100,14 +100,6 @@ export default function DashboardView({ return ( - {section.title && !section.isList && ( - - - {section.title} - - - )} - void; diff --git a/src/components/LatestItems/LatestItems.tsx b/src/components/LatestItems/LatestItems.tsx index 066a2e6..badc744 100644 --- a/src/components/LatestItems/LatestItems.tsx +++ b/src/components/LatestItems/LatestItems.tsx @@ -6,6 +6,7 @@ import LatestItemsView from "./LatestItems.view"; type Props = { reportData: ReportData; flow: "outflows" | "inflows"; + header: string; selectedPeriodId: string | null; selectedGroupKey?: GroupKey | null; accentColor: string; @@ -15,6 +16,7 @@ type Props = { export default function LatestItems({ reportData, flow, + header, selectedPeriodId, selectedGroupKey = null, accentColor, @@ -35,6 +37,7 @@ export default function LatestItems({ return ( - Recent Transactions + {header} diff --git a/src/components/ProgressCard/TopTags.tsx b/src/components/ProgressCard/TopTags.tsx index 85a923c..fa57bc7 100644 --- a/src/components/ProgressCard/TopTags.tsx +++ b/src/components/ProgressCard/TopTags.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { Box } from "@mui/material"; +import { Box, Paper, Typography } from "@mui/material"; import { ReportData, GroupKey } from "../../features/report"; import ProgressCard from "./ProgressCard"; import { extractTopTags } from "./TopTags.adapter"; @@ -7,6 +7,7 @@ import { extractTopTags } from "./TopTags.adapter"; type Props = { reportData: ReportData; flow: "outflows" | "inflows"; + header: string; selectedPeriodId?: string | null; selectedGroupKey?: GroupKey | null; setSelectedGroupKey?: (key: GroupKey | null) => void; @@ -17,6 +18,7 @@ type Props = { export default function TopTags({ reportData, flow, + header, selectedPeriodId, selectedGroupKey, setSelectedGroupKey, @@ -28,37 +30,56 @@ export default function TopTags({ }, [reportData, flow, selectedPeriodId]); return ( - - {items.map((item) => { - const isSelected = selectedGroupKey?.tags?.includes(item.tag); - return ( - { - if (setSelectedGroupKey) { - setSelectedGroupKey(isSelected ? null : { tags: [item.tag] }); - } - }} - /> - ); - })} - + + {header} + + + + {items.map((item) => { + const isSelected = selectedGroupKey?.tags?.includes(item.tag); + return ( + { + if (setSelectedGroupKey) { + setSelectedGroupKey(isSelected ? null : { tags: [item.tag] }); + } + }} + /> + ); + })} + + ); } diff --git a/src/dashboard-config.ts b/src/dashboard-config.ts index ebed2da..eeb1d3d 100644 --- a/src/dashboard-config.ts +++ b/src/dashboard-config.ts @@ -31,6 +31,7 @@ export const configuration: DashboardConfig = { }, { id: "items", + title: 'Recent Transactions', component: LatestItems, style: { size: 12,