bito-code-review[bot] commented on PR #39506:
URL: https://github.com/apache/superset/pull/39506#issuecomment-5377681483
<!-- Bito Reply -->
The current implementation uses `loc.pathname.startsWith('/explore')` and
`loc.pathname.startsWith('/superset/explore')` to determine if the navigation
stays within the Explore route. If you want to align this more strictly with
the router configuration, you could define a constant or a helper function that
encapsulates the exact paths where the Chart page is mounted (e.g.,
`['/explore/', '/explore/p']`). Using a regex or a path-matching utility would
also be a more robust alternative to `startsWith` if the route structure
becomes more complex.
**superset-frontend/src/pages/Chart/index.tsx**
```
const EXPLORE_ROUTES = ['/explore/', '/explore/p'];
const isExploreRoute = EXPLORE_ROUTES.some(route =>
loc.pathname.startsWith(route));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]