Refactor: Reorder budget cards
Move expense chart card to the top for better visibility.
This commit is contained in:
@@ -49,8 +49,16 @@ const HomeContent: React.FC<HomeContentProps> = ({
|
|||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
{/* 지출 카테고리 */}
|
||||||
|
<h2 className="text-lg font-semibold mb-3">지출 분석</h2>
|
||||||
|
{getCategorySpending().some(cat => cat.current > 0 || cat.total > 0) ? (
|
||||||
|
<BudgetCategoriesSection categories={getCategorySpending()} />
|
||||||
|
) : (
|
||||||
|
<EmptyState />
|
||||||
|
)}
|
||||||
|
|
||||||
{/* 목표 진행 상황 */}
|
{/* 목표 진행 상황 */}
|
||||||
<h2 className="text-lg font-semibold mb-3">예산과 지출</h2>
|
<h2 className="text-lg font-semibold mb-3 mt-6">예산과 지출</h2>
|
||||||
<BudgetProgressCard
|
<BudgetProgressCard
|
||||||
budgetData={budgetData}
|
budgetData={budgetData}
|
||||||
selectedTab={selectedTab}
|
selectedTab={selectedTab}
|
||||||
@@ -60,13 +68,6 @@ const HomeContent: React.FC<HomeContentProps> = ({
|
|||||||
onSaveBudget={handleBudgetGoalUpdate}
|
onSaveBudget={handleBudgetGoalUpdate}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* 지출 카테고리 */}
|
|
||||||
{getCategorySpending().some(cat => cat.current > 0 || cat.total > 0) ? (
|
|
||||||
<BudgetCategoriesSection categories={getCategorySpending()} />
|
|
||||||
) : (
|
|
||||||
<EmptyState />
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* 최근 지출 */}
|
{/* 최근 지출 */}
|
||||||
{transactions.length > 0 ? (
|
{transactions.length > 0 ? (
|
||||||
<RecentTransactionsSection
|
<RecentTransactionsSection
|
||||||
|
|||||||
Reference in New Issue
Block a user