@orsetra/shared-ui 1.0.48 → 1.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -64,7 +64,8 @@ export function MainSidebar({
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
const handleSubMenuClick = (href: string) => {
|
|
67
|
+
const handleSubMenuClick = (e: React.MouseEvent, href: string) => {
|
|
68
|
+
e.preventDefault()
|
|
68
69
|
const path = href.startsWith('http://') || href.startsWith('https://')
|
|
69
70
|
? new URL(href).pathname
|
|
70
71
|
: href
|
|
@@ -153,7 +154,7 @@ export function MainSidebar({
|
|
|
153
154
|
<Link
|
|
154
155
|
key={subItem.id}
|
|
155
156
|
href={subItem.href}
|
|
156
|
-
onClick={() => handleSubMenuClick(subItem.href)}
|
|
157
|
+
onClick={(e) => handleSubMenuClick(e,subItem.href)}
|
|
157
158
|
className="flex items-center gap-3 px-4 py-2 text-sm text-text-secondary hover:bg-ui-background hover:text-text-primary transition-colors"
|
|
158
159
|
>
|
|
159
160
|
<subItem.icon className="h-4 w-4" />
|