fix: remove router reference by paanSinghCoder · Pull Request #1403 · raystack/frontier

238-239: ⚠️ Potential issue | 🟡 Minor

startsWith can produce false-positive active state on prefix-sharing routes.

React Router's NavLink used matchPath which is path-segment–aware. currentPath.startsWith(path) will erroneously activate the chip for any route that shares the raw string prefix — e.g., a route at /organizations/:id/apis-v2 would light up the API chip.

🛡️ Segment-aware fix
 function checkActive(path: string) {
-  return currentPath.startsWith(path);
+  return currentPath === path || currentPath.startsWith(path + '/');
 }

220-260: ⚠️ Potential issue | 🟠 Major

Wrap Chip with <a> tag or use NavLink to restore semantic link structure — current approach loses keyboard navigation and screen reader announcements.

The organizations navbar replaces NavLink (which renders <a> and handles keyboard Tab/Enter navigation) with a bare Chip component using only onClick. In contrast, the users navbar correctly wraps Chip inside NavLink, preserving the semantic link element.

The Apsara Chip component (v0.56.2) supports optional role, ariaLabel, and onClick props, but does not automatically render as <button> or <a>. Without an explicit semantic element, it loses: keyboard Tab-focus and Enter navigation, browser affordances (right-click → "Open in new tab"), URL preview in status bar, and screen-reader "link" announcements.

Either wrap the Chip in an <a> or <NavLink> element (matching the users navbar pattern), or explicitly set role="link" with tabIndex={0} and add keyboard Enter/Space handlers.