import { Box, Button, ButtonGroup, Paper, Typography } from '@mui/material'; import Image from 'next/image'; import PropType from 'prop-types'; import { useState } from 'react'; const CartCard = ({ product, initialQuantity, remove, updateQuantity }) => { const [quantity, setQuantity] = useState(initialQuantity); // useEffect(() => { // updateQuantity(product?.customID, quantity); // }, [quantity]); return ( profile {product?.name} Quantity Price: ${product?.price} ); }; CartCard.propTypes = { product: PropType.shape({ category: PropType.string, name: PropType.string, image: PropType.string, description: PropType.string, place: PropType.string, people: PropType.string, process: PropType.string, pairing: PropType.string, available: PropType.Boolean, isFeatured: PropType.Boolean, price: PropType.number, customID: PropType.string, }), initialQuantity: PropType.number, remove: PropType.func, updateQuantity: PropType.func, }; export default CartCard;