diff --git a/src/components/BudgetCategoriesSection.tsx b/src/components/BudgetCategoriesSection.tsx index 512003a..c066a9d 100644 --- a/src/components/BudgetCategoriesSection.tsx +++ b/src/components/BudgetCategoriesSection.tsx @@ -1,6 +1,8 @@ + import React from 'react'; -import { categoryIcons } from '@/constants/categoryIcons'; +import { categoryIcons, CATEGORY_DESCRIPTIONS } from '@/constants/categoryIcons'; import { formatCurrency } from '@/utils/formatters'; + interface BudgetCategoriesSectionProps { categories: { title: string; @@ -8,6 +10,7 @@ interface BudgetCategoriesSectionProps { total: number; }[]; } + const BudgetCategoriesSection: React.FC = ({ categories }) => { @@ -31,12 +34,23 @@ const BudgetCategoriesSection: React.FC = ({ // 남은 예산 또는 초과 예산 const budgetStatusText = isOverBudget ? '예산 초과: ' : '남은 예산: '; const budgetAmount = isOverBudget ? Math.abs(category.total - category.current) : Math.max(0, category.total - category.current); + + // 카테고리 설명 가져오기 + const description = CATEGORY_DESCRIPTIONS[category.title] || ''; + return
{categoryIcons[category.title]}
-

{category.title}

+

+ {category.title} + {description && ( + + {description} + + )} +

@@ -63,4 +77,5 @@ const BudgetCategoriesSection: React.FC = ({
; }; -export default BudgetCategoriesSection; \ No newline at end of file + +export default BudgetCategoriesSection;