diff --git a/frontend/src/components/dashboard/SpendingByCategoryCard.tsx b/frontend/src/components/dashboard/SpendingByCategoryCard.tsx index b1ea417..e3939f2 100644 --- a/frontend/src/components/dashboard/SpendingByCategoryCard.tsx +++ b/frontend/src/components/dashboard/SpendingByCategoryCard.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { ChevronRight } from "lucide-react"; +import { SquareDivide } from "lucide-react"; import { Cell, Pie, PieChart, ResponsiveContainer, Tooltip } from "recharts"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/Card"; import { CategoryBreakdownModal } from "@/components/categories/CategoryBreakdownModal"; @@ -76,7 +76,23 @@ export function SpendingByCategoryCard({ items }: SpendingByCategoryCardProps) { const Icon = getCategoryIcon(item.icon); const hasChildren = item.children.length > 0; return ( -
  • +
  • + {/* Fixed-width slot on every row, populated or not — the + amount column at the row's end must stay flush right + the same way whether or not this row has a + breakdown to open. */} + + {hasChildren && ( + + )} + {formatCurrency(item.amount)} - {/* Fixed-width slot on every row, populated or not — a - chevron shown only on rows with children would shift - their amount left relative to every other row's. */} - - {hasChildren && ( - - )} -
  • ); })} diff --git a/frontend/src/components/reports/CategoryRankingCard.tsx b/frontend/src/components/reports/CategoryRankingCard.tsx index 31ac51a..455c443 100644 --- a/frontend/src/components/reports/CategoryRankingCard.tsx +++ b/frontend/src/components/reports/CategoryRankingCard.tsx @@ -1,5 +1,5 @@ import { useState } from "react"; -import { ChevronRight } from "lucide-react"; +import { SquareDivide } from "lucide-react"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/Card"; import { CategoryBreakdownModal } from "@/components/categories/CategoryBreakdownModal"; import { getCategoryIcon } from "@/lib/icons"; @@ -50,6 +50,22 @@ export function CategoryRankingCard({ items, isLoading, selectedCategoryId, onSe isSelected ? "bg-surface-2" : "" }`} > + {/* Fixed-width slot on every row, populated or not — the + amount column at the row's end must stay flush right + the same way whether or not this row has a + breakdown to open. */} + + {hasChildren && ( + + )} + - {/* Fixed-width slot on every row, populated or not — a - chevron shown only on rows with children would shift - their amount left relative to every other row's. */} - - {hasChildren && ( - - )} - );