Update category labels

Add descriptions to category labels in the UI.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-21 10:10:25 +00:00
parent 9352b1bb27
commit 11d824a38f
2 changed files with 16 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
import React from 'react';
import { formatCurrency } from '@/utils/formatters';
import { useIsMobile } from '@/hooks/use-mobile';
import { CATEGORY_DESCRIPTIONS } from '@/constants/categoryIcons';
interface CategorySpending {
title: string;
@@ -42,7 +43,14 @@ const CategorySpendingList: React.FC<CategorySpendingListProps> = ({
<div className="w-6 h-6 rounded-full" style={{
backgroundColor: getCategoryColor(category.title)
}}></div>
<span>{category.title}</span>
<span>
{category.title}
{CATEGORY_DESCRIPTIONS[category.title] && (
<span className="text-gray-500 text-sm ml-1">
{CATEGORY_DESCRIPTIONS[category.title]}
</span>
)}
</span>
</div>
<div className="text-right">
<p className="font-medium">