Skip to content

Commit

Permalink
remove unused stripe promise (#3248)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablonyx authored Nov 26, 2024
1 parent 77cf9b3 commit 2ecc28b
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions web/src/app/ee/admin/cloud-settings/BillingInformationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,13 @@ import { useEffect } from "react";
export default function BillingInformationPage() {
const router = useRouter();
const { popup, setPopup } = usePopup();
const stripePromise = loadStripe(
process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!
);

const {
data: billingInformation,
error,
isLoading,
refreshBillingInformation,
} = useBillingInformation();

const [seats, setSeats] = useState<number>(1);

useEffect(() => {
if (billingInformation?.seats) {
setSeats(billingInformation.seats);
}
}, [billingInformation?.seats]);

if (error) {
console.error("Failed to fetch billing information:", error);
}
Expand Down Expand Up @@ -66,7 +54,9 @@ export default function BillingInformationPage() {
if (!response.ok) {
const errorData = await response.json();
throw new Error(
`Failed to create customer portal session: ${errorData.message || response.statusText}`
`Failed to create customer portal session: ${
errorData.message || response.statusText
}`
);
}

Expand Down

0 comments on commit 2ecc28b

Please sign in to comment.