Commit 914a35b2 authored by isstuev's avatar isstuev

nav tooltip fix

parent 71759af1
...@@ -3,6 +3,7 @@ import NextLink from 'next/link'; ...@@ -3,6 +3,7 @@ import NextLink from 'next/link';
import { route } from 'nextjs-routes'; import { route } from 'nextjs-routes';
import React from 'react'; import React from 'react';
import useIsMobile from 'lib/hooks/useIsMobile';
import type { NavItem } from 'lib/hooks/useNavItems'; import type { NavItem } from 'lib/hooks/useNavItems';
import { isInternalItem } from 'lib/hooks/useNavItems'; import { isInternalItem } from 'lib/hooks/useNavItems';
...@@ -17,6 +18,7 @@ type Props = { ...@@ -17,6 +18,7 @@ type Props = {
} }
const NavLink = ({ item, isCollapsed, px, className }: Props) => { const NavLink = ({ item, isCollapsed, px, className }: Props) => {
const isMobile = useIsMobile();
const colors = useColors(); const colors = useColors();
const isExpanded = isCollapsed === false; const isExpanded = isCollapsed === false;
...@@ -45,7 +47,7 @@ const NavLink = ({ item, isCollapsed, px, className }: Props) => { ...@@ -45,7 +47,7 @@ const NavLink = ({ item, isCollapsed, px, className }: Props) => {
<Tooltip <Tooltip
label={ item.text } label={ item.text }
hasArrow={ false } hasArrow={ false }
isDisabled={ isCollapsed === false || (isCollapsed === undefined && isXLScreen) } isDisabled={ isMobile || isCollapsed === false || (isCollapsed === undefined && isXLScreen) }
placement="right" placement="right"
variant="nav" variant="nav"
gutter={ 20 } gutter={ 20 }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment