mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-05-29 17:19:36 +02:00
remove unused stripe promise (#3248)
This commit is contained in:
parent
77cf9b3539
commit
2ecc28b57d
@ -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);
|
||||
}
|
||||
@ -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
|
||||
}`
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user