Skip to content

Commit

Permalink
Update AS nav Engines link
Browse files Browse the repository at this point in the history
- should eventually show active on creation routes but not on single engine routes
  • Loading branch information
cee-chen committed Jun 23, 2021
1 parent 1990a35 commit 352b043
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { setMockValues } from '../../../__mocks__/kea_logic';

jest.mock('../../../shared/layout', () => ({
generateNavLink: jest.fn(({ to }) => ({ href: to })),
generateNavLink: jest.fn(({ to, items }) => ({ href: to, items })),
}));
jest.mock('../engine/engine_nav', () => ({
useEngineNav: () => [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ export const useAppSearchNav = () => {
{
id: 'engines',
name: ENGINES_TITLE,
...generateNavLink({ to: ENGINES_PATH, isRoot: true }),
items: useEngineNav(),
...generateNavLink({
to: ENGINES_PATH,
isRoot: true,
shouldShowActiveForSubroutes: true,
items: useEngineNav(),
}),
},
];

Expand Down

0 comments on commit 352b043

Please sign in to comment.