From 5ac0d48ec7b0673de98cbfc5d60ccddf7887e8cc Mon Sep 17 00:00:00 2001 From: Leon Xu Date: Sat, 7 May 2022 14:02:49 -0700 Subject: [PATCH] doc: add useState for handleError and setDisabled --- src/Checkout/Payment/Payment.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Checkout/Payment/Payment.js b/src/Checkout/Payment/Payment.js index 6540e93..7a16886 100644 --- a/src/Checkout/Payment/Payment.js +++ b/src/Checkout/Payment/Payment.js @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useState } from "react"; import { useStateValue } from "../../redux/StateProvider"; import { Link } from "react-router-dom"; import CheckoutProduct from "../CheckoutProduct"; @@ -10,6 +10,9 @@ function Payment() { const stripe = useStripe(); const elements = useElements(); + const [error, handleError] = useState(null); + const [disabled, setDisabled] = useState(true); + const handleSubmit = (e) => {}; const handleChange = (e) => {};