seo/sitemap #18
@ -27,7 +27,9 @@ function NavigationItem(props: NavigationItemProps) {
|
|||||||
return props.section.links.some((link) => checkIsLinkActive(link));
|
return props.section.links.some((link) => checkIsLinkActive(link));
|
||||||
};
|
};
|
||||||
|
|
||||||
const [isOpened, setIsOpened] = createSignal(checkIsActive());
|
const [isOpened, setIsOpened] = createSignal(
|
||||||
|
checkIsActive() || pageContext.urlPathname === "/",
|
||||||
|
);
|
||||||
|
|
||||||
createEffect(() => {
|
createEffect(() => {
|
||||||
// If the current URL path is the same as the link's href, set isOpened to true
|
// If the current URL path is the same as the link's href, set isOpened to true
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user