Prechádzať zdrojové kódy

Remove unused context

Mauricio Araujo 2 rokov pred
rodič
commit
44bd884cc3

+ 1 - 3
dashboard/src/main/home/modals/BillingModal.tsx

@@ -1,4 +1,4 @@
-import React, { Component, useEffect, useState } from "react";
+import React from "react";
 import { Elements } from "@stripe/react-stripe-js";
 import { loadStripe } from "@stripe/stripe-js";
 import styled from "styled-components";
@@ -12,8 +12,6 @@ import PaymentSetupForm from "./PaymentSetupForm";
 const stripePromise = loadStripe(process.env.STRIPE_PUBLISHABLE_KEY || "");
 
 const BillingModal = ({ project_id, back, onCreate }) => {
-  const { setCurrentModal } = useContext(Context);
-
   const appearance = {
     variables: {
       colorPrimary: "#aaaabb",

+ 6 - 6
dashboard/src/main/home/project-settings/ProjectSettings.tsx

@@ -85,12 +85,12 @@ function ProjectSettings(props: any) {
         });
       }
 
-      // if (currentProject?.billing_enabled) {
-      tabOpts.push({
-        value: "billing",
-        label: "Billing",
-      });
-      // }
+      if (currentProject?.billing_enabled) {
+        tabOpts.push({
+          value: "billing",
+          label: "Billing",
+        });
+      }
 
       tabOpts.push({
         value: "additional-settings",