mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 11:25:06 +03:00
TanStack route ids for index routes carry a trailing slash
(e.g. '/project/$ref/'), and toNextPathPattern was passing that
through verbatim. Next's pages-router never includes a trailing
slash in router.pathname, so consumers like the project sidebar's
active-route check (router.pathname.split('/')[3]) saw an empty
string for index pages instead of undefined - and the home icon
stopped highlighting on /project/<ref>.
Drop the trailing slash unconditionally, except for the root path
itself.