Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: loading invoices on hard reload

Kevin Grünebergc8f89be2cf6c
diff --git a/studio/components/interfaces/BillingV2/Invoices.tsx b/studio/components/interfaces/BillingV2/Invoices.tsx
index 7e76d49d5e5..74c40ec8971 100644
--- a/studio/components/interfaces/BillingV2/Invoices.tsx
+++ b/studio/components/interfaces/BillingV2/Invoices.tsx
@@ -27,6 +27,8 @@ const Invoices: FC<Props> = ({ projectRef }) => {
const offset = (page - 1) * PAGE_LIMIT
useEffect(() => {
+ if (!projectRef) return
+
let cancel = false
const page = 1
@@ -48,7 +50,7 @@ const Invoices: FC<Props> = ({ projectRef }) => {
return () => {
cancel = true
}
- }, [])
+ }, [projectRef])
const fetchInvoices = async (page: number) => {
setLoading(true)