mirror of
https://github.com/luxfi/explore.git
synced 2026-10-30 14:46:12 +00:00
* 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
12 lines
460 B
TypeScript
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));
|
|
}
|