фикс кнопки
This commit is contained in:
@@ -11,10 +11,8 @@ const ProductForm = ({ product, categories, conditions, onSubmit, onCancel, isEd
|
||||
image: ''
|
||||
});
|
||||
|
||||
// Заполняем форму данными товара при редактировании
|
||||
useEffect(() => {
|
||||
if (isEditing && product) {
|
||||
|
||||
setFormData({
|
||||
name: product.name || '',
|
||||
price: product.price || '',
|
||||
@@ -45,6 +43,8 @@ const ProductForm = ({ product, categories, conditions, onSubmit, onCancel, isEd
|
||||
conditionId: parseInt(formData.conditionId),
|
||||
inStock: true
|
||||
};
|
||||
|
||||
onSubmit(shmotkaData);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user