Skip to content

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

Fix toast duration

Joshen Limf254b2dd8c7a
diff --git a/studio/components/interfaces/Billing/ProUpgrade/ProUpgrade.tsx b/studio/components/interfaces/Billing/ProUpgrade/ProUpgrade.tsx
index ee952890360..20f73b165de 100644
--- a/studio/components/interfaces/Billing/ProUpgrade/ProUpgrade.tsx
+++ b/studio/components/interfaces/Billing/ProUpgrade/ProUpgrade.tsx
@@ -142,6 +142,7 @@ const ProUpgrade: FC<Props> = ({
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/components/layouts/ProjectLayout/ProjectLayout.tsx b/studio/components/layouts/ProjectLayout/ProjectLayout.tsx
index 1eba9da18cb..02427b283f1 100644
--- a/studio/components/layouts/ProjectLayout/ProjectLayout.tsx
+++ b/studio/components/layouts/ProjectLayout/ProjectLayout.tsx
@@ -78,9 +78,6 @@ interface ContentWrapperProps {
/**
* Check project.status to show building state or error state
*
- * TODO: how can we test project connection properly?
- * ex: the status is ACTIVE_HEALTHY but the project instance is down.
- *
* [Joshen] As of 210422: Current testing connection by pinging postgres
* Ideally we'd have a more specific monitoring of the project such as during restarts
* But that will come later: https://supabase.slack.com/archives/C01D6TWFFFW/p1650427619665549
diff --git a/studio/hooks/misc/useStore.tsx b/studio/hooks/misc/useStore.tsx
index bfc801f9b1e..15f553cb98b 100644
--- a/studio/hooks/misc/useStore.tsx
+++ b/studio/hooks/misc/useStore.tsx
@@ -50,14 +50,15 @@ export const StoreProvider: FC<StoreProvider> = ({ children, rootStore }) => {
autorun(() => {
if (ui.notification) {
const { id, category, error, message, progress, duration } = ui.notification
+ const toastDuration = duration || 4000
switch (category) {
case 'info':
- return toast(message, { id, duration })
+ return toast(message, { id, duration: toastDuration })
case 'success':
- return toast.success(message, { id, duration })
+ return toast.success(message, { id, duration: toastDuration })
case 'error':
console.error('Error:', { error, message })
- return toast.error(message, { id, duration })
+ return toast.error(message, { id, duration: toastDuration })
case 'loading':
if (progress) {
return toast.loading(