The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Show toast for downgrading to free involving compute size change a little longer
Joshen Lim30324ab1cb53
diff --git a/studio/components/interfaces/Billing/ExitSurvey/ExitSurvey.tsx b/studio/components/interfaces/Billing/ExitSurvey/ExitSurvey.tsxindex 078097e93c4..c236d347acd 100644--- a/studio/components/interfaces/Billing/ExitSurvey/ExitSurvey.tsx+++ b/studio/components/interfaces/Billing/ExitSurvey/ExitSurvey.tsx@@ -125,11 +125,13 @@ const ExitSurvey: FC<Props> = ({ freeTier, subscription, onSelectBack }) => {ui.setNotification({category: 'info',message: getDowngradeSuccessMessage(),+ duration: 8000,})ui.setNotification({category: 'success',message:'Your project has been updated and is currently restarting to update its instance size',+ duration: 8000,})router.push(`/project/${projectRef}`)} else {diff --git a/studio/hooks/misc/useStore.tsx b/studio/hooks/misc/useStore.tsxindex 111a2caff95..bfc801f9b1e 100644--- a/studio/hooks/misc/useStore.tsx+++ b/studio/hooks/misc/useStore.tsx@@ -49,15 +49,15 @@ export const StoreProvider: FC<StoreProvider> = ({ children, rootStore }) => {autorun(() => {if (ui.notification) {- const { id, category, error, message, progress } = ui.notification+ const { id, category, error, message, progress, duration } = ui.notificationswitch (category) {case 'info':- return toast(message, { id })+ return toast(message, { id, duration })case 'success':- return toast.success(message, { id })+ return toast.success(message, { id, duration })case 'error':console.error('Error:', { error, message })- return toast.error(message, { id })+ return toast.error(message, { id, duration })case 'loading':if (progress) {return toast.loading(diff --git a/studio/types/ui.ts b/studio/types/ui.tsindex 9eeb823a21a..4d58fa0b698 100644--- a/studio/types/ui.ts+++ b/studio/types/ui.ts@@ -4,4 +4,5 @@ export interface Notification {id?: stringerror?: any // Optional: Any other errors that needs to be logged out in the consoleprogress?: number // Optional: For loading messages to show a progress bar (Out of 100)+ duration?: number // Optional: How long to show the message for (ms)}