doc: add useState for handleError and setDisabled

This commit is contained in:
Leon Xu
2022-05-07 14:02:49 -07:00
parent 7b96e90ea8
commit 5ac0d48ec7
+4 -1
View File
@@ -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) => {};