more
This commit is contained in:
@@ -21,6 +21,7 @@ const ConfirmModal = ({
|
||||
titleText,
|
||||
}) => {
|
||||
const title = titleText ? titleText : "Confirmation";
|
||||
|
||||
return (
|
||||
<Modal show="true" onHide={onCancel} size="lg">
|
||||
<Modal.Header closeButton>
|
||||
|
||||
@@ -31,6 +31,7 @@ import Radio from "../../pageElements/Radio";
|
||||
import "../../styles/signup.scss";
|
||||
import Stripe from "stripe";
|
||||
import { stripeApiKey, marchEmailPrm } from "../../secrets";
|
||||
import ConfirmModal from "../Modals/ConfirmModal";
|
||||
|
||||
const SignupPage = () => {
|
||||
const { isUpgrade, currentPlan } = useParams();
|
||||
@@ -59,7 +60,8 @@ const SignupPage = () => {
|
||||
: process.env.REACT_APP_API_PROD;
|
||||
const [showAddAccount, setShowAddAccount] = useState(false);
|
||||
const [numberOfAccountsToAdd, setNumberOfAccountsToAdd] = useState();
|
||||
const [showPromoModal, setShowPromoModal] = useState("");
|
||||
const [showPromoModal, setShowPromoModal] = useState(false);
|
||||
|
||||
const handleChangeInput = (e, name) => {
|
||||
const newData = handleFormDataChange(e, name, data, signupFields);
|
||||
if (newData !== null) {
|
||||
@@ -236,6 +238,12 @@ const SignupPage = () => {
|
||||
setShowPaymentModal(true);
|
||||
};
|
||||
|
||||
const handleCancelModal = () => {
|
||||
console.log("handleCancelModal");
|
||||
setShowPromoModal(!showPromoModal);
|
||||
setShowSelectPlan(!showSelectPlan);
|
||||
};
|
||||
|
||||
const handleOpenSelectPlan = (e) => {
|
||||
e.preventDefault();
|
||||
if (isBusy) {
|
||||
@@ -246,10 +254,8 @@ const SignupPage = () => {
|
||||
if (dataValues === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
saveLeadData(dataValues);
|
||||
|
||||
setShowSelectPlan(!showSelectPlan);
|
||||
setShowPromoModal(!showPromoModal);
|
||||
};
|
||||
|
||||
const handleToggle = (e) => {
|
||||
@@ -660,6 +666,15 @@ const SignupPage = () => {
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
{showPromoModal ? (
|
||||
<ConfirmModal
|
||||
titleText="TEST"
|
||||
onCancel={handleCancelModal}
|
||||
buttonLabelText="Enter Code"
|
||||
/>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user