diff --git a/resources/ts/Components/layout/DrawerEntry.tsx b/resources/ts/Components/layout/DrawerEntry.tsx index 874131b53..499b1fc38 100644 --- a/resources/ts/Components/layout/DrawerEntry.tsx +++ b/resources/ts/Components/layout/DrawerEntry.tsx @@ -14,22 +14,21 @@ import {ValueOf} from 'type-fest'; type Icons = ValueOf; -export interface DrawerEntryAttributes extends Attributes { - route: string; +export interface DrawerEntryAttributes extends Attributes, ListItemLink { icon: Icons; } export class DrawerEntry extends Component { view(vnode: Vnode) { return ( - + ); } - isRouteActive(routeName: string) { - return route().current(routeName); + isRouteActive(href: string) { + return route(route().current()!) === href; } navigateToRoute(event: Event) {