mirror of
https://github.com/supabase/supabase.git
synced 2026-10-11 04:15:04 +03:00
Next's pages-router useRouter() returns both \`pathname\` and \`route\`
holding the bracketed route pattern (always the same value in pages
mode). Our compat shim only exposed \`pathname\`, so studio call sites
that read \`router.route\` (AppLayout/BranchLink, AppLayout/ProjectDropdown)
got \`undefined\` and crashed when sanitizeRoute() did \`route.split('/')\`.
Surfaced when opening the project selector dropdown — BranchLink
errored at render and tripped the route's ErrorBoundary.
Mirror \`pathname\` into \`route\` in both shims (next/router and
next/compat/router).