Files
tom goriunovandGitHub 0b7382bd27 Navigation: horizontal layout (#1991)
* add ENV for navigation layout type

* add network menu to top bar

* renaming and main component placeholder

* add logo, testnet badge, login and connect wallet buttons to the nav bar

* refactor once more

* styles for nav link group

* style nav link

* style groupped nav links

* update values for L2 review

* update demo values

* fix deployment values for L2 review

* tests

* fix prop collision

* shorten filter input on marketplace page and update MainArea height

* change margin between text and lightning label

* add active state to "Other" nav menu

* popover fixes

* fix link width

* [skip ci] update demo values
2024-06-19 15:58:13 +02:00

12 lines
460 B
TypeScript

import type { NavItem } from 'types/client/navigation';
import config from 'configs/app';
import { isInternalItem } from 'lib/hooks/useNavItems';
export function checkRouteHighlight(item: NavItem | Array<NavItem> | Array<Array<NavItem>>): boolean {
if (Array.isArray(item)) {
return item.some((subItem) => checkRouteHighlight(subItem));
}
return isInternalItem(item) && (config.UI.navigation.highlightedRoutes.includes(item.nextRoute.pathname));
}