This commit is contained in:
Kenneth Jannette
2024-01-19 18:37:12 -06:00
parent 38a988e420
commit 14efb6d311
4 changed files with 31 additions and 6 deletions

View File

@@ -32,7 +32,7 @@ const PaymentModal = ({
<Row key={`row${j}`}>
{names.map((name, i) => (
<Col key={`${name}${i + fieldsChunkSize * j}`} className="mb-3">
{console.log("paymentdata", paymentData)}
{console.log("paymentdata, name", paymentData, name)}
<TextInput
name={name}
value={paymentData[name].value}
@@ -61,7 +61,7 @@ const PaymentModal = ({
<Modal.Title>Enter Payment Card Information</Modal.Title>
</Modal.Header>
<Modal.Body>
<span>{modalText}</span>
<div className="payment-modal-text-wrapper">{modalText}</div>
<Form className="payment-form">
<ModalForm />
</Form>

View File

@@ -32,6 +32,7 @@ const SignupPage = () => {
getFormDataDefaults(paymentfields)
);
const [showPaymentModal, setShowPaymentModal] = useState(false);
const modalText = "Description of monthly and annual subscriptions";
const handleChangeInput = (e, name) => {
const newData = handleFormDataChange(e, name, data, signupfields);
@@ -41,7 +42,13 @@ const SignupPage = () => {
};
const handleChangePaymentInput = (e, name) => {
const newPaymentData = handleFormDataChange(e, name, data, paymentfields);
console.log("e, name", e, name);
const newPaymentData = handleFormDataChange(
e,
name,
paymentData,
paymentfields
);
if (newPaymentData !== null) {
setPaymentData(newPaymentData);
}
@@ -169,6 +176,7 @@ const SignupPage = () => {
<Row key={`row${j}`}>
{names.map((name, i) => (
<Col key={`${name}${i + fieldsChunkSize * j}`} className="mb-3">
{console.log("data, name", data, name)}
<TextInput
name={name}
value={data[name].value}
@@ -257,6 +265,7 @@ const SignupPage = () => {
setShowPaymentModal={setShowPaymentModal}
handleChangePaymentInput={handleChangePaymentInput}
handleSignUp={handleSignUp}
modalText={modalText}
/>
) : (
<></>