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