fix routing

This commit is contained in:
Kirill Zhumarin 2026-01-15 09:34:58 +00:00
parent c51d3ae63c
commit 793ea66f39

View file

@ -1,5 +1,5 @@
import { Component } from "solid-js";
import { useMatch } from "@solidjs/router";
import { A, useMatch } from "@solidjs/router";
import { resolveURL } from "@/utils";
import clsx from "clsx";
@ -12,12 +12,12 @@ export interface SidebarLinkProps {
export const SidebarLink: Component<SidebarLinkProps> = (props) => {
const match = useMatch(() => resolveURL(props.href));
return (
<a
<A
class={clsx("sidebar__link", match() && "sidebar__link--active")}
href={props.href}
>
<i class={`bi ${props.icon} sidebar__icon`}/>
<span class="sidebar__label">{props.label}</span>
</a>
</A>
);
};