Skip to content

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

Merge pull request #16126 from supabase/chore/nav-layout-self-hosted

Joshen Lime2ffe37ab97e
diff --cc studio/components/interfaces/App/RouteValidationWrapper.tsx
index 8e9ef20f0f6,c33cb43bc44..f2bb8a31b74
--- a/studio/components/interfaces/App/RouteValidationWrapper.tsx
+++ b/studio/components/interfaces/App/RouteValidationWrapper.tsx
@@@ -68,11 -68,10 +68,11 @@@ const RouteValidationWrapper = ({ child
// Check validity of project that the user is trying to access
const projects = projectsRef.current ?? []
const isValidProject = projects.some((project) => project.ref === ref)
+ const isValidBranch = projects.some((project) => project.preview_branch_refs.includes(ref))
- if (!isValidProject) {
+ if (!isValidProject && !isValidBranch) {
ui.setNotification({ category: 'error', message: 'This project does not exist' })
- router.push(navLayoutV2 ? `/org/${organizations?.[0].slug}` : '/projects')
+ router.push(navLayoutV2 ? `/org/${organizations?.[0].slug}` : DEFAULT_HOME)
return
}
}