This commit is contained in:
Kenneth Jannette
2024-02-15 20:14:37 -06:00
parent 57d3de5073
commit a742bc7ae5
2 changed files with 20 additions and 4 deletions

View File

@@ -21,6 +21,7 @@ const ConfirmModal = ({
titleText,
}) => {
const title = titleText ? titleText : "Confirmation";
return (
<Modal show="true" onHide={onCancel} size="lg">
<Modal.Header closeButton>

View File

@@ -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>
);
};