mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-06-01 02:30:18 +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() {
|
export default function BillingInformationPage() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { popup, setPopup } = usePopup();
|
const { popup, setPopup } = usePopup();
|
||||||
const stripePromise = loadStripe(
|
|
||||||
process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!
|
|
||||||
);
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
data: billingInformation,
|
data: billingInformation,
|
||||||
error,
|
error,
|
||||||
isLoading,
|
isLoading,
|
||||||
refreshBillingInformation,
|
|
||||||
} = useBillingInformation();
|
} = useBillingInformation();
|
||||||
|
|
||||||
const [seats, setSeats] = useState<number>(1);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (billingInformation?.seats) {
|
|
||||||
setSeats(billingInformation.seats);
|
|
||||||
}
|
|
||||||
}, [billingInformation?.seats]);
|
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
console.error("Failed to fetch billing information:", error);
|
console.error("Failed to fetch billing information:", error);
|
||||||
}
|
}
|
||||||
@ -66,7 +54,9 @@ export default function BillingInformationPage() {
|
|||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
const errorData = await response.json();
|
const errorData = await response.json();
|
||||||
throw new Error(
|
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