fix(admin): absolute sidebar nav links so /admin URLs don't accumulate (v0.52.2)
The /admin left-rail NavLinks used relative targets (to="users", etc.). Under the /admin/* nested route a relative link resolves against the current URL, so each click appended a segment — Users→Allowlist→Graduation yielded /admin/users/allowlist/graduation instead of /admin/graduation. Use absolute targets (/admin/<tab>) + `end` for exact active matching. Patch 0.52.1 → 0.52.2; CHANGELOG updated. Caught by the operator on PPE. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "rfc-app-frontend",
|
||||
"private": true,
|
||||
"version": "0.52.1",
|
||||
"version": "0.52.2",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -59,7 +59,8 @@ export default function Admin({ viewer }) {
|
||||
{tabs.map(t => (
|
||||
<li key={t.path}>
|
||||
<NavLink
|
||||
to={t.path}
|
||||
to={`/admin/${t.path}`}
|
||||
end
|
||||
className={({ isActive }) => `admin-rail-link ${isActive ? 'active' : ''}`}
|
||||
>
|
||||
{t.label}
|
||||
|
||||
Reference in New Issue
Block a user