import { Button, ButtonGroup, Typography } from '@mui/material'; import { Box } from '@mui/system'; import { useTranslation } from 'next-i18next'; import Image from 'next/image'; import { useState } from 'react'; interface DataProps { name: string; description: string; } interface ProductInfoProps { data: DataProps; bColor: string; inCart: boolean; addProductToCart: (quantity: number) => void; } const ProductInfo: React.FC = ({ data, bColor, addProductToCart, inCart }) => { const { t } = useTranslation('home'); const [quantity, setQuantity] = useState(1); const handleIncrement = () => { setQuantity((prevState) => prevState + 1); }; const handleDecrement = () => { if (quantity > 1) { setQuantity((prevState) => prevState - 1); } }; return ( {data.name} reviews {data.description} ); }; export default ProductInfo;