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

12
src/utils/formatters.ts Normal file
View File

@@ -0,0 +1,12 @@
export const formatCurrency = (amount: number): string => {
return new Intl.NumberFormat('ko-KR', {
style: 'currency',
currency: 'KRW',
maximumFractionDigits: 0
}).format(amount);
};
export const calculatePercentage = (spent: number, target: number): number => {
return Math.min(Math.round(spent / target * 100), 100);
};