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:
@@ -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>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user