Refactor: Split Index page

Refactor Index.tsx into smaller, more manageable components.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-15 02:23:57 +00:00
parent 19ecbd2728
commit ae391e606b
6 changed files with 241 additions and 151 deletions

View File

@@ -0,0 +1,32 @@
import React from 'react';
import BudgetCard from '@/components/BudgetCard';
interface BudgetCategoriesSectionProps {
categories: {
title: string;
current: number;
total: number;
}[];
}
const BudgetCategoriesSection: React.FC<BudgetCategoriesSectionProps> = ({ categories }) => {
return (
<>
<h2 className="text-lg font-semibold mb-3 mt-8"> </h2>
<div className="grid gap-4 mb-8">
{categories.map((category, index) => (
<BudgetCard
key={index}
title={category.title}
current={category.current}
total={category.total}
color="neuro-income"
/>
))}
</div>
</>
);
};
export default BudgetCategoriesSection;