From 9f31878c1eee0cd9bda11f1aa2421dbc1f51f689 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Wed, 24 Jan 2024 23:48:10 -0600 Subject: [PATCH] more --- src/Components/SignupPage/SignupPage.js | 47 ++++++++++++++++++------- src/Constants/Fields/SignupFields.js | 8 ++++- src/styles/signup.scss | 44 +++++++++++++++++++++++ 3 files changed, 85 insertions(+), 14 deletions(-) diff --git a/src/Components/SignupPage/SignupPage.js b/src/Components/SignupPage/SignupPage.js index eb6705b..d29cc59 100644 --- a/src/Components/SignupPage/SignupPage.js +++ b/src/Components/SignupPage/SignupPage.js @@ -33,6 +33,7 @@ const SignupPage = () => { getFormDataDefaults(paymentfields) ); const [showPaymentModal, setShowPaymentModal] = useState(false); + const [showSelectPlan, setShowSelectPlan] = useState(true); const modalText = "Description of monthly and annual subscriptions"; // this could also go in App.js if needed in the future @@ -129,6 +130,11 @@ const SignupPage = () => { const handleProceedToPayment = (e) => { e.preventDefault(); + setShowPaymentModal(true); + }; + + const handleOpenSelectPlan = (e) => { + e.preventDefault(); if (isBusy) { return; } @@ -137,10 +143,7 @@ const SignupPage = () => { if (dataValues === null) { return; } - - setShowPaymentModal(true); }; - async function handleStripeAuthorization( user, paymentDataValues, @@ -276,7 +279,6 @@ const SignupPage = () => { {names.map((name, i) => ( - {console.log("data, name", data, name)} { ))} ))} - + { /> - + { className="primary-button signup-proceed" type="button" size="lg" - onClick={handleProceedToPayment} + onClick={handleOpenSelectPlan} disabled={isBusy} - labelText="Proceed to Payment" + labelText="Select A Plan" /> -
- - Go to login - -
{showNoticeOnPage ? ( @@ -360,6 +357,30 @@ const SignupPage = () => { <> )} + {showSelectPlan ? ( +
+
+
+
+ Select your subscription plan +
+
+
+
+
+
+
+ ) : ( + <> + )} {showPaymentModal ? (