22 lines
502 B
JavaScript
22 lines
502 B
JavaScript
import { useState } from "react";
|
|
import SuccessPay from "./SuccessPay";
|
|
import FailedPay from "./FailedPay";
|
|
import Paying from "./Paying";
|
|
|
|
function Payment() {
|
|
|
|
const [typePay, setTypePay] = useState('default');
|
|
|
|
return (
|
|
<>
|
|
{typePay === 'default' ?
|
|
<Paying setTypePay={setTypePay} /> :
|
|
typePay === 'success' ?
|
|
<SuccessPay /> :
|
|
<FailedPay />
|
|
}
|
|
</>
|
|
)
|
|
}
|
|
|
|
export default Payment |