|
@@ -1,4 +1,4 @@
|
|
|
-import React, { Component, useEffect, useState } from "react";
|
|
|
|
|
|
|
+import React from "react";
|
|
|
import { Elements } from "@stripe/react-stripe-js";
|
|
import { Elements } from "@stripe/react-stripe-js";
|
|
|
import { loadStripe } from "@stripe/stripe-js";
|
|
import { loadStripe } from "@stripe/stripe-js";
|
|
|
import styled from "styled-components";
|
|
import styled from "styled-components";
|
|
@@ -11,9 +11,7 @@ import PaymentSetupForm from "./PaymentSetupForm";
|
|
|
|
|
|
|
|
const stripePromise = loadStripe(process.env.STRIPE_PUBLISHABLE_KEY || "");
|
|
const stripePromise = loadStripe(process.env.STRIPE_PUBLISHABLE_KEY || "");
|
|
|
|
|
|
|
|
-const BillingModal = ({ project_id, back, onCreate }) => {
|
|
|
|
|
- const { setCurrentModal } = useContext(Context);
|
|
|
|
|
-
|
|
|
|
|
|
|
+const BillingModal = ({ back, onCreate }) => {
|
|
|
const appearance = {
|
|
const appearance = {
|
|
|
variables: {
|
|
variables: {
|
|
|
colorPrimary: "#aaaabb",
|
|
colorPrimary: "#aaaabb",
|
|
@@ -49,10 +47,7 @@ const BillingModal = ({ project_id, back, onCreate }) => {
|
|
|
options={options}
|
|
options={options}
|
|
|
appearance={appearance}
|
|
appearance={appearance}
|
|
|
>
|
|
>
|
|
|
- <PaymentSetupForm
|
|
|
|
|
- projectId={project_id}
|
|
|
|
|
- onCreate={onCreate}
|
|
|
|
|
- ></PaymentSetupForm>
|
|
|
|
|
|
|
+ <PaymentSetupForm onCreate={onCreate}></PaymentSetupForm>
|
|
|
</Elements>
|
|
</Elements>
|
|
|
</div>
|
|
</div>
|
|
|
</>
|
|
</>
|