mirror of
https://github.com/siemens-mobile-hacks/web-devtools.git
synced 2026-11-25 23:57:40 +00:00
fix routing
This commit is contained in:
parent
c51d3ae63c
commit
793ea66f39
1 changed files with 3 additions and 3 deletions
|
|
@ -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>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue