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 = ({ projectRef }) => { const offset = (page - 1) * PAGE_LIMIT useEffect(() => { + if (!projectRef) return + let cancel = false const page = 1 @@ -48,7 +50,7 @@ const Invoices: FC = ({ projectRef }) => { return () => { cancel = true } - }, []) + }, [projectRef]) const fetchInvoices = async (page: number) => { setLoading(true)