From 97fe5046f68b5e4ee5f750945bcc39a27f5eb37b Mon Sep 17 00:00:00 2001
From: 苏向夜 <fu050409@163.com>
Date: Sun, 29 Mar 2026 00:54:21 +0800
Subject: chore(ui): refactor effect instance check

---
 packages/ui/src/components/sidebar.tsx | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'packages/ui/src/components/sidebar.tsx')

diff --git a/packages/ui/src/components/sidebar.tsx b/packages/ui/src/components/sidebar.tsx
index d81156f..e615274 100644
--- a/packages/ui/src/components/sidebar.tsx
+++ b/packages/ui/src/components/sidebar.tsx
@@ -23,10 +23,6 @@ function NavItem({ Icon, label, to }: NavItemProps) {
   const location = useLocation();
   const isActive = location.pathname === to;
 
-  const handleClick = () => {
-    navigate(to);
-  };
-
   return (
     <Button
       variant="ghost"
@@ -35,7 +31,7 @@ function NavItem({ Icon, label, to }: NavItemProps) {
         isActive && "relative bg-accent",
       )}
       size="lg"
-      onClick={handleClick}
+      onClick={() => navigate(to)}
     >
       <Icon className="size-5" strokeWidth={isActive ? 2.5 : 2} />
       <span className="hidden lg:block text-sm relative z-10">{label}</span>
@@ -185,7 +181,11 @@ export function Sidebar() {
 
       <div className="w-full lg:px-3 flex-1 flex flex-col justify-end">
         <DropdownMenu>
-          <DropdownMenuTrigger render={renderUserAvatar()} className="w-full">
+          <DropdownMenuTrigger
+            render={renderUserAvatar()}
+            nativeButton={false}
+            className="w-full"
+          >
             Open
           </DropdownMenuTrigger>
           <DropdownMenuContent align="end" side="right" sideOffset={20}>
-- 
cgit v1.2.3-70-g09d2

