more
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { useState } from "react";
|
||||
import Button from "../../pageElements/Button";
|
||||
import Modal from "react-bootstrap/Modal";
|
||||
import TextInput from "../../pageElements/TextInput";
|
||||
@@ -6,12 +5,6 @@ import { splitEvery } from "../../Utils/Array";
|
||||
import Col from "react-bootstrap/Col";
|
||||
import Form from "react-bootstrap/Form";
|
||||
import Row from "react-bootstrap/Row";
|
||||
import {
|
||||
getFormDataDefaults,
|
||||
getValidatedFormData,
|
||||
handleFormDataChange,
|
||||
isFormDataHasErrors,
|
||||
} from "../../Utils/Form";
|
||||
import "../../styles/modals.scss";
|
||||
|
||||
const PaymentModal = ({
|
||||
@@ -32,7 +25,6 @@ const PaymentModal = ({
|
||||
<Row key={`row${j}`}>
|
||||
{names.map((name, i) => (
|
||||
<Col key={`${name}${i + fieldsChunkSize * j}`} className="mb-3">
|
||||
{console.log("paymentdata, name", paymentData, name)}
|
||||
<TextInput
|
||||
name={name}
|
||||
value={paymentData[name].value}
|
||||
@@ -58,7 +50,7 @@ const PaymentModal = ({
|
||||
return (
|
||||
<Modal show="true" size="lg">
|
||||
<Modal.Header closeButton>
|
||||
<Modal.Title>Enter Payment Card Information</Modal.Title>
|
||||
<Modal.Title>Enter Payment Information</Modal.Title>
|
||||
</Modal.Header>
|
||||
<Modal.Body>
|
||||
<div className="payment-modal-text-wrapper">{modalText}</div>
|
||||
|
||||
@@ -62,7 +62,7 @@ const SignupPage = () => {
|
||||
};
|
||||
|
||||
const validatePaymentData = () => {
|
||||
const newPaymentData = ""; // getValidatedFormData(data, signupfields);
|
||||
const newPaymentData = getValidatedFormData(data, paymentfields);
|
||||
const hasErrors = isFormDataHasErrors(newPaymentData);
|
||||
setPaymentData(newPaymentData);
|
||||
return hasErrors ? null : objectMap(({ value }) => value, newPaymentData);
|
||||
|
||||
Reference in New Issue
Block a user