From eb396ba7c4c2aa0575bbe3bb21e8ba4574ee88a5 Mon Sep 17 00:00:00 2001 From: Aslam H Date: Sat, 9 Nov 2024 13:20:15 +0700 Subject: [PATCH] fix: wrong type and exact only page --- web/app/components/custom/nav-item.tsx | 5 ++--- web/app/components/sidebar/partials/link-collection.tsx | 8 +++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/web/app/components/custom/nav-item.tsx b/web/app/components/custom/nav-item.tsx index 0ca11183..64248b69 100644 --- a/web/app/components/custom/nav-item.tsx +++ b/web/app/components/custom/nav-item.tsx @@ -2,9 +2,9 @@ import { Link } from "@tanstack/react-router" import { cn } from "@/lib/utils" import { LaIcon } from "~/components/custom/la-icon" import { icons } from "lucide-react" -import type { NavigateOptions } from "@tanstack/react-router" +import type { LinkOptions } from "@tanstack/react-router" -interface NavItemProps extends NavigateOptions { +interface NavItemProps extends LinkOptions { title: string count: number icon: keyof typeof icons @@ -26,7 +26,6 @@ export function NavItem({ "text-[var(--less-foreground)] hover:bg-[var(--item-hover)] focus-visible:outline-none focus-visible:ring-0", className, )} - activeOptions={{ exact: true }} activeProps={{ className: 'bg-[var(--item-active)] data-[status="active"]:hover:bg-[var(--item-active)]', diff --git a/web/app/components/sidebar/partials/link-collection.tsx b/web/app/components/sidebar/partials/link-collection.tsx index 06c4b432..eb2d75f6 100644 --- a/web/app/components/sidebar/partials/link-collection.tsx +++ b/web/app/components/sidebar/partials/link-collection.tsx @@ -27,7 +27,13 @@ export const LinkCollection: React.FC = () => {
- +