import React from 'react'; import { categoryIcons } from '@/constants/categoryIcons'; import { formatCurrency } from '@/utils/formatters'; interface BudgetCategoriesSectionProps { categories: { title: string; current: number; total: number; }[]; } const BudgetCategoriesSection: React.FC = ({ categories }) => { return <>

지출 그래프

{categories.map((category, index) => (
{categoryIcons[category.title]}

{category.title}

{formatCurrency(category.current)}

/ {formatCurrency(category.total)}

{Math.min(Math.round((category.current / category.total) * 100), 100)}%
))}
; }; export default BudgetCategoriesSection;