import React from 'react' import CurrencyFormat from "react-currency-format" import { useStateValue } from '../../context/StateProvider' import './Subtotal.css' import { getCartTotal } from '../../context/reducer' import { useHistory } from 'react-router-dom' function Subtotal() { const history = useHistory() const [{ cart }] = useStateValue() return (
Subtotal ({cart.length} items) : {`${value}`}
This order contains a gift > )} decimalScale={2} value={getCartTotal(cart)} displayType={"text"} thousandSeparator={true} prefix={"₹"} />