Skip to content

Commit 8038f4b

Browse files
committed
TCA-215 - fix mobile issue for clicking hamburger menu
1 parent 1824915 commit 8038f4b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src-ts/header/tool-selectors/tool-selectors-narrow/tool-selector-narrow/ToolSelectorNarrow.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import classNames from 'classnames'
22
import { FC, useContext } from 'react'
33
import { Link, useLocation } from 'react-router-dom'
44

5-
import { IconOutline, PlatformRoute, routeContext, RouteContextData } from '../../../../lib'
5+
import { IconOutline, PlatformRoute, routeContext, RouteContextData, routeIsActiveTool } from '../../../../lib'
66

77
import styles from './ToolSelectorNarrow.module.scss'
88

@@ -16,13 +16,12 @@ const ToolSelectorNarrow: FC<ToolSelectorNarrowProps> = (props: ToolSelectorNarr
1616

1717
const {
1818
getPathFromRoute,
19-
isActiveTool,
2019
}: RouteContextData = useContext(routeContext)
2120

2221
const toolRoute: PlatformRoute = props.route
2322
const toolPath: string = getPathFromRoute(toolRoute)
2423
const baseClass: string = 'tool-selector-narrow'
25-
const isActive: boolean = isActiveTool(useLocation().pathname, toolRoute)
24+
const isActive: boolean = routeIsActiveTool(useLocation().pathname, toolRoute)
2625
const activeIndicaterClass: string = `${baseClass}-${isActive ? '' : 'in'}active`
2726
const hasChildren: boolean = !!toolRoute.children?.some(child => !!child.route && !isParamRoute(child.route))
2827

0 commit comments

Comments
 (0)