doc: add useState for handleError and setDisabled
This commit is contained in:
1 parent
7b96e90ea8
commit
5ac0d48ec7
1 file changed
+4
-1
@@ -1,4 +1,4 @@
|
|||||||
import React from "react";
|
import React, { useState } from "react";
|
||||||
import { useStateValue } from "../../redux/StateProvider";
|
import { useStateValue } from "../../redux/StateProvider";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import CheckoutProduct from "../CheckoutProduct";
|
import CheckoutProduct from "../CheckoutProduct";
|
||||||
@@ -10,6 +10,9 @@ function Payment() {
|
|||||||
const stripe = useStripe();
|
const stripe = useStripe();
|
||||||
const elements = useElements();
|
const elements = useElements();
|
||||||
|
|
||||||
|
const [error, handleError] = useState(null);
|
||||||
|
const [disabled, setDisabled] = useState(true);
|
||||||
|
|
||||||
const handleSubmit = (e) => {};
|
const handleSubmit = (e) => {};
|
||||||
const handleChange = (e) => {};
|
const handleChange = (e) => {};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user