The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Fix expired stripe invoices
Joshen Limd183d2b5d96b
diff --git a/studio/components/interfaces/Billing/Invoices.tsx b/studio/components/interfaces/Billing/Invoices.tsxindex e74b7fdc82b..618aaba77ab 100644--- a/studio/components/interfaces/Billing/Invoices.tsx+++ b/studio/components/interfaces/Billing/Invoices.tsx@@ -72,6 +72,11 @@ const Invoices: FC<Props> = ({ projectRef }) => {setLoading(false)}+ const fetchInvoice = async (invoiceId: string) => {+ const invoice = await get(`${API_URL}/stripe/invoices/${invoiceId}`)+ window.open(invoice.invoice_pdf, '_blank')+ }+return (<div className="my-4 container max-w-4xl space-y-1"><Loading active={loading}>@@ -117,12 +122,11 @@ const Invoices: FC<Props> = ({ projectRef }) => {</Table.td><Table.td className="align-right"><div className="flex items-center space-x-2 justify-end">- <a href={x.hosted_invoice_url} target="_blank">- <Button type="outline">View invoice</Button>- </a>- <form method="get" action={x.invoice_pdf}>- <Button type="outline" icon={<IconDownload />} htmlType="submit" />- </form>+ <Button+ type="outline"+ icon={<IconDownload />}+ onClick={() => fetchInvoice(x.id)}+ /></div></Table.td></Table.tr>diff --git a/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSettings.tsx b/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSettings.tsxindex 98a89f779ed..c7267766955 100644--- a/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSettings.tsx+++ b/studio/components/interfaces/Organization/InvoicesSettings/InvoicesSettings.tsx@@ -79,6 +79,11 @@ const InvoicesSettings: FC<Props> = ({ organization }) => {setLoading(false)}+ const fetchInvoice = async (invoiceId: string) => {+ const invoice = await get(`${API_URL}/stripe/invoices/${invoiceId}`)+ window.open(invoice.invoice_pdf, '_blank')+ }+return (<div className="my-4 container max-w-4xl space-y-1"><Loading active={loading}>@@ -120,12 +125,11 @@ const InvoicesSettings: FC<Props> = ({ organization }) => {</Table.td><Table.td className="align-right"><div className="flex items-center space-x-2 justify-end">- <a href={x.hosted_invoice_url} target="_blank">- <Button type="outline">View invoice</Button>- </a>- <form method="get" action={x.invoice_pdf}>- <Button type="outline" icon={<IconDownload />} htmlType="submit" />- </form>+ <Button+ type="outline"+ icon={<IconDownload />}+ onClick={() => fetchInvoice(x.id)}+ /></div></Table.td></Table.tr>