diff --git a/src/Checkout/Payment/Payment.js b/src/Checkout/Payment/Payment.js index 5c9d463..78a41f7 100644 --- a/src/Checkout/Payment/Payment.js +++ b/src/Checkout/Payment/Payment.js @@ -2,8 +2,10 @@ import React, { useState } from "react"; import { useStateValue } from "../../redux/StateProvider"; import { Link } from "react-router-dom"; import CheckoutProduct from "../CheckoutProduct"; -import "./Payment.css"; import { CardElement, useElements, useStripe } from "@stripe/react-stripe-js"; +import { CurrencyFormat } from "react-currency-format"; +import { getBasketTotal } from "../../redux/reducer"; +import "./Payment.css"; function Payment() { const [{ basket, user }, dispatch] = useStateValue(); @@ -58,6 +60,17 @@ function Payment() {
+ +
+

Order Total: {value}

} + decimalScale={2} + value={getBasketTotal(basket)} + displayType={"text"} + thousandSeparator={true} + prefix={"$"} + /> +