Merge pull request #1853 from RafaelTaranto/fix/id-routing

LAM-1422 fix: show subheader on refresh
This commit is contained in:
Rafael Taranto 2025-05-18 09:28:32 +01:00 committed by GitHub
commit 8c77a52a31

View file

@ -33,9 +33,8 @@ const Link = ({
}) => {
const [location] = useLocation()
const [isActive] = useRoute(props.to)
if (isActive) setActive(item)
const isParentActive = isParent && location.startsWith(props.to)
if (isActive || isParentActive) setActive(item)
const classNames = classnames({
[className]: true,