The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix: default redirectTo
phamhieu163e78a3c3db
diff --git a/studio/hooks/misc/withAuth.tsx b/studio/hooks/misc/withAuth.tsxindex a0571bc07ad..680c4c34cb1 100644--- a/studio/hooks/misc/withAuth.tsx+++ b/studio/hooks/misc/withAuth.tsx@@ -24,7 +24,7 @@ export function withAuth(const { app, ui } = rootStoreconst page = router.pathname.split('/')[3]- const redirectTo = options?.redirectTo ?? (!isUndefined(ref) ? `/project/${ref}` : '/')+ const redirectTo = options?.redirectTo ?? defaultRedirectTo(ref)const redirectIfFound = options?.redirectIfFoundconst returning =@@ -75,6 +75,10 @@ export function withAuth(}}+function defaultRedirectTo(ref: string | string[] | undefined) {+ return IS_PLATFORM ? '/' : !isUndefined(ref) ? `/project/${ref}` : '/'+}+function checkRedirectTo(loading: boolean,router: NextRouter,