From cc0f238725ac1febbe9ec60a0b8684289bcec04c Mon Sep 17 00:00:00 2001 From: TinsFox Date: Sun, 3 Nov 2024 00:45:08 +0800 Subject: [PATCH] feat: external link --- src/components/nav-sidebar/app-sidebar.tsx | 7 +------ src/components/nav-sidebar/nav-secondary.tsx | 8 +++++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/components/nav-sidebar/app-sidebar.tsx b/src/components/nav-sidebar/app-sidebar.tsx index 4b30ba6..151f2d0 100644 --- a/src/components/nav-sidebar/app-sidebar.tsx +++ b/src/components/nav-sidebar/app-sidebar.tsx @@ -1,7 +1,6 @@ import { env } from "@env" import { Command, - LifeBuoy, Send, } from "lucide-react" import * as React from "react" @@ -22,15 +21,11 @@ import { import { useNavMenu } from "@/hooks/query/user-memu" const navSecondary = [ - { - title: "Support", - url: "#", - icon: LifeBuoy, - }, { title: "Feedback", url: "https://github.com/TinsFox/shadcnui-boilerplate/issues", icon: Send, + external: true, }, ] diff --git a/src/components/nav-sidebar/nav-secondary.tsx b/src/components/nav-sidebar/nav-secondary.tsx index 4fa1d87..0b2d58b 100644 --- a/src/components/nav-sidebar/nav-secondary.tsx +++ b/src/components/nav-sidebar/nav-secondary.tsx @@ -1,5 +1,6 @@ import type { LucideIcon } from "lucide-react" import * as React from "react" +import { Link } from "react-router-dom" import { SidebarGroup, @@ -14,9 +15,10 @@ export function NavSecondary({ ...props }: { items: { - title: string + title: I18nKeys url: string icon: LucideIcon + external?: boolean }[] } & React.ComponentPropsWithoutRef) { return ( @@ -26,10 +28,10 @@ export function NavSecondary({ {items.map((item) => ( - + {item.title} - + ))}