Update CartCard.js

This commit is contained in:
DavidBelisle 2022-11-07 23:40:38 -05:00
parent 07f284323a
commit 5423d90953

View File

@ -2,7 +2,7 @@ import { Card, Button, Form, Row, Col } from 'react-bootstrap';
import { useContext, useState, useEffect } from 'react'; import { useContext, useState, useEffect } from 'react';
import { CartContext } from './Cart'; import { CartContext } from './Cart';
const CartCard = ({ product }) => { export function CartCard({ product }) {
const cart = useContext(CartContext); const cart = useContext(CartContext);
const productQuantity = cart.getProductQuantity(product.id); const productQuantity = cart.getProductQuantity(product.id);