Update CartCard.js
This commit is contained in:
parent
07f284323a
commit
5423d90953
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user