Merge pull request #36 from kjannette/raidModal

Raid modal
This commit is contained in:
S Jannette
2024-01-19 20:03:14 -06:00
committed by GitHub
2 changed files with 32 additions and 37 deletions

View File

@@ -20,8 +20,15 @@ const PaymentModal = ({
}) => { }) => {
const fieldsChunkSize = 2; const fieldsChunkSize = 2;
const ModalForm = () => { return (
return splitEvery(Object.keys(paymentfields), fieldsChunkSize).map( <Modal show="true" size="lg">
<Modal.Header closeButton>
<Modal.Title>Enter Payment Information</Modal.Title>
</Modal.Header>
<Modal.Body>
<div className="payment-modal-text-wrapper">{modalText}</div>
<Form className="payment-form">
{splitEvery(Object.keys(paymentfields), fieldsChunkSize).map(
(names, j) => ( (names, j) => (
<Row key={`row${j}-modal`}> <Row key={`row${j}-modal`}>
{names.map((name, i) => ( {names.map((name, i) => (
@@ -49,18 +56,7 @@ const PaymentModal = ({
))} ))}
</Row> </Row>
) )
); )}
};
return (
<Modal show="true" size="lg">
<Modal.Header closeButton>
<Modal.Title>Enter Payment Information</Modal.Title>
</Modal.Header>
<Modal.Body>
<div className="payment-modal-text-wrapper">{modalText}</div>
<Form className="payment-form">
<ModalForm />
</Form> </Form>
</Modal.Body> </Modal.Body>
<Modal.Footer> <Modal.Footer>
@@ -82,7 +78,3 @@ const PaymentModal = ({
}; };
export default PaymentModal; export default PaymentModal;
/*
onHide={onCancel}
*/

View File

@@ -116,6 +116,7 @@ const SignupPage = () => {
if (isBusy) { if (isBusy) {
return; return;
} }
const dataValues = validateData(); const dataValues = validateData();
if (dataValues === null) { if (dataValues === null) {
return; return;
@@ -136,10 +137,12 @@ const SignupPage = () => {
if (paymentDataValues === null) { if (paymentDataValues === null) {
return; return;
} }
const dataValues = validateData(); const dataValues = validateData();
if (dataValues === null) { if (dataValues === null) {
return; return;
} }
setIsBusy(true); setIsBusy(true);
const paymentSuccess = handleStripeAuthorization(paymentDataValues); const paymentSuccess = handleStripeAuthorization(paymentDataValues);
if (paymentSuccess) { if (paymentSuccess) {