diff --git a/frontend/src/components/CardItem.jsx b/frontend/src/components/CardItem.jsx index 7d11565..9834626 100644 --- a/frontend/src/components/CardItem.jsx +++ b/frontend/src/components/CardItem.jsx @@ -2,15 +2,12 @@ import { useState } from "react"; import Arrow from "../components/Arrow"; export default function CardItem({ item, onAddToCart }) { - // Начальный вес — 100 грамм (0.100 кг) const [weight, setWeight] = useState(0.1); - // Увеличение веса с шагом 100 грамм const handleIncrement = () => { setWeight((prev) => parseFloat((prev + 0.1).toFixed(3))); }; - // Уменьшение веса (не позволяет опуститься ниже минимальных 100 грамм) const handleDecrement = () => { setWeight((prev) => prev > 0.1 ? parseFloat((prev - 0.1).toFixed(3)) : 0.1, @@ -19,11 +16,11 @@ export default function CardItem({ item, onAddToCart }) { return (