Adjust the layout of the category spending chart to align vertically with the payment method chart, while keeping the payment method chart's position unchanged.
- Modify the add transaction button to prevent the plus icon from rotating.
- Implement a hover effect that expands the button and displays "지출 입력" (Add Expense).
The comparison `type === 'weekly'` was causing a type error because the type of `type` was `BudgetPeriod`, which includes `"monthly"` and `"weekly"`. The code was attempting to directly assign `"monthly"` to `type` after this comparison, which is not allowed. To fix this, a new variable `period` of type `BudgetPeriod` is created and assigned the value of `type`. The comparison is then performed on `period`, and if it is equal to `"weekly"`, `period` is set to `"monthly"`. Finally, `period` is used in the subsequent logic.
The budget update logic was modified to ensure that all budget updates are applied to the monthly budget, regardless of the selected tab. This resolves inconsistencies in budget calculations and data storage.
- Fix the budget display issue where monthly budgets were showing four amounts instead of one.
- Resolve the functionality of the "Edit Budget" button.
Splits the `useBudgetDataState` hook into smaller, more manageable hooks for state management, data loading, and event handling. This improves code organization and maintainability while preserving existing functionality.
Refactor budgetUtils.ts to improve code organization and maintainability by splitting the logic into multiple files. The functionality remains the same.
Splits the BudgetTabContent component into smaller, more manageable components to improve code organization and maintainability. The UI and logic are separated into distinct components while preserving the original functionality.
Addresses issues where budget data wasn't displaying correctly after input and ensures correct automatic calculation of daily/weekly budgets from monthly input.
Addresses problems with budget display and data reset:
- Ensures budget data is correctly displayed after initialization.
- Fixes issue where daily and weekly budget data were missing.
- Corrects data reset to properly clear transaction data.
The module `src/constants/categoryIcons.tsx` does not export `CATEGORY_TITLE_SUGGESTIONS`, but it is imported in `src/utils/userTitlePreferences.ts`. This commit fixes the import error.
The CATEGORY_DESCRIPTIONS and CATEGORY_TITLE_SUGGESTIONS exports were missing from the categoryIcons module, causing errors. This commit adds these exports to resolve the issue.
- Fix issue where budget input for transportation and other categories were not saved correctly.
- Fix issue where total budget amount was calculated incorrectly.
- Fix issue where daily and weekly budgets were not displayed correctly.
The `useAuth` hook was being called outside of the `AuthProvider`, leading to an error. This commit ensures that all components using `useAuth` are wrapped within the `AuthProvider`.
The `useBudget` hook was being called outside of a `BudgetProvider`, leading to an error. This commit ensures that the `useBudget` hook is only called within the `BudgetProvider` context.
The BudgetContext.tsx file was throwing an error because it was trying to import `BudgetPeriod` from the wrong location. Changed the import path to correctly reference the `BudgetPeriod` type.
- Fix TS2353: Object literal may only specify known properties, and 'paymentMethod' does not exist in type 'Transaction'.
- Fix TS1205: Re-exporting a type when 'isolatedModules' is enabled requires using 'export type'.
- Fix TS2741: Property 'getPaymentMethodStats' is missing in type '{ transactions: Transaction[]; budgetData: BudgetData; categoryBudgets: Record<string, number>; selectedTab: BudgetPeriod; setSelectedTab: React.Dispatch<...>; ... 5 more ...; resetBudgetData: () => void; }' but required in type 'BudgetContextType'.