Fixed up general layout of manage page + root + styled login page.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useElements, useStripe, CardElement } from "@stripe/react-stripe-js";
|
||||
import { useElements, useStripe } from "@stripe/react-stripe-js";
|
||||
import { Form, Modal } from "antd";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
selectCurrentUser,
|
||||
} from "../../redux/user/user.selectors";
|
||||
import PaymentForm from "../payment-form/payment-form.container";
|
||||
import axios from "axios";
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
paymentModal: selectPayment,
|
||||
bodyshop: selectBodyshop,
|
||||
@@ -38,7 +37,7 @@ function InvoiceEnterModalContainer({
|
||||
error: null,
|
||||
cardComplete: false,
|
||||
});
|
||||
const [stripeState, setStripeState] = stripeStateArr;
|
||||
const stripeState = stripeStateArr[0];
|
||||
|
||||
const cardValid = !!!stripeState.error && stripeState.cardComplete;
|
||||
|
||||
@@ -105,14 +104,12 @@ function InvoiceEnterModalContainer({
|
||||
onCancel={handleCancel}
|
||||
afterClose={() => form.resetFields()}
|
||||
okButtonProps={{ loading: loading, disabled: !cardValid }}
|
||||
destroyOnClose
|
||||
>
|
||||
destroyOnClose>
|
||||
<Form
|
||||
onFinish={handleFinish}
|
||||
autoComplete={"off"}
|
||||
form={form}
|
||||
initialValues={{ jobid: context.jobId }}
|
||||
>
|
||||
initialValues={{ jobid: context.jobId }}>
|
||||
<PaymentForm form={form} stripeStateArr={stripeStateArr} />
|
||||
</Form>
|
||||
</Modal>
|
||||
|
||||
Reference in New Issue
Block a user