File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 17
17
}
18
18
19
19
const handleMouseover = (menuItem : NavMenuItem ) => async (ev ) => {
20
- if (activeRoute ) {
21
- return ;
22
- }
23
-
24
20
if (! itemHasHoverMenu (menuItem )) {
25
21
return ;
26
22
}
Original file line number Diff line number Diff line change 40
40
style =' primary'
41
41
menuItems ={menuItems }
42
42
isMobile ={$isMobile }
43
+ showHoverMenu ={! primaryRoute }
43
44
>
44
45
<svelte:fragment slot =" auth" >
45
46
<AboutUsMenuItem />
54
55
activeRoute ={secondaryRoute }
55
56
style =' secondary'
56
57
menuItems ={primaryRoute .children }
58
+ showHoverMenu ={! secondaryRoute ?.children ?.length }
57
59
/>
58
60
{/if }
59
61
Original file line number Diff line number Diff line change 10
10
export let activeRoutePath: NavMenuItem[] = [];
11
11
export let activeRoute: NavMenuItem;
12
12
export let isMobile: boolean = false ;
13
+ export let showHoverMenu: boolean = true ;
13
14
14
15
let popupIsVisible: boolean;
15
16
let hoveredElement: HTMLElement | undefined ;
31
32
isPopupMenuActive ={popupIsVisible }
32
33
style ={style }
33
34
>
34
- {#if ! activeRoute }
35
+ {#if showHoverMenu }
35
36
<HoverMenu
36
37
activeRoute ={activeRoutePath [3 ] ?? activeRoutePath [2 ]}
37
38
menuItems ={hoveredMenuItem ?.children }
You can’t perform that action at this time.
0 commit comments