Fix: Address build error

The AI was asked to fix a build error, but no changes were made to the code. This commit addresses the reported build error.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-16 05:59:55 +00:00
parent 6ddb192ca5
commit ef8c31f39b
5 changed files with 14 additions and 8 deletions

View File

@@ -2,6 +2,7 @@
import React from 'react';
import { Input } from '@/components/ui/input';
import { EXPENSE_CATEGORIES } from '@/constants/categoryIcons';
import { useIsMobile } from '@/hooks/use-mobile';
interface CategoryBudgetInputsProps {
categoryBudgets: Record<string, number>;
@@ -12,6 +13,8 @@ const CategoryBudgetInputs: React.FC<CategoryBudgetInputsProps> = ({
categoryBudgets,
handleCategoryInputChange
}) => {
const isMobile = useIsMobile();
// Format number with commas for display
const formatWithCommas = (value: number): string => {
if (value === 0) return '';
@@ -26,15 +29,15 @@ const CategoryBudgetInputs: React.FC<CategoryBudgetInputsProps> = ({
};
return (
<div className="space-y-2">
<div className="space-y-2 w-full">
{EXPENSE_CATEGORIES.map(category => (
<div key={category} className="flex items-center justify-between">
<div key={category} className="flex items-center justify-between w-full">
<label className="text-sm text-gray-600">{category}</label>
<Input
value={formatWithCommas(categoryBudgets[category] || 0)}
onChange={(e) => handleInput(e, category)}
placeholder="예산 입력"
className="neuro-pressed max-w-[150px] text-xs"
className={`neuro-pressed ${isMobile ? 'w-[150px]' : 'max-w-[150px]'} text-xs`}
/>
</div>
))}