Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af48bd2fa0 |
@@ -323,11 +323,9 @@ export function Sidebar({ apps, className, onNavigate }: SidebarProps) {
|
|||||||
const starredRouteStats = starredItems.filter((i) => i.type === 'routestat')
|
const starredRouteStats = starredItems.filter((i) => i.type === 'routestat')
|
||||||
const hasStarred = starredItems.length > 0
|
const hasStarred = starredItems.length > 0
|
||||||
|
|
||||||
// For exchange detail pages, use the reveal path for sidebar selection so
|
// When a sidebar reveal path is provided (e.g. via Cmd-K navigation),
|
||||||
// the parent route is highlighted (exchanges have no sidebar entry of their own)
|
// use it for sidebar selection so the correct item is highlighted
|
||||||
const effectiveSelectedPath = location.pathname.startsWith('/exchanges/') && sidebarRevealPath
|
const effectiveSelectedPath = sidebarRevealPath ?? location.pathname
|
||||||
? sidebarRevealPath
|
|
||||||
: location.pathname
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<aside className={`${styles.sidebar} ${className ?? ''}`}>
|
<aside className={`${styles.sidebar} ${className ?? ''}`}>
|
||||||
|
|||||||
Reference in New Issue
Block a user