import React from 'react' import './Cart.css' import { useStateValue } from '../../context/StateProvider' import CartProducts from '../CartProducts/CartProducts' import Subtotal from '../Subtotal/Subtotal' import FlipMove from 'react-flip-move'; function Cart() { const [{ cart }] = useStateValue() return (
{ } {cart?.length === 0 ? (

Your Cart is Empty

) : (

Your Cart

{/* List all the checkout products */} {cart?.map((item, index) => (
))}
)}
{cart.length > 0 && (
)}
) } export default Cart