@orsetra/shared-ui 1.0.48 → 1.0.50
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,10 +64,14 @@ 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()
|
|
69
|
+
console.log('handleSubMenuClick - href:', href)
|
|
68
70
|
const path = href.startsWith('http://') || href.startsWith('https://')
|
|
69
71
|
? new URL(href).pathname
|
|
70
72
|
: href
|
|
73
|
+
console.log('handleSubMenuClick - path:', path)
|
|
74
|
+
console.log('Redirecting to:', path)
|
|
71
75
|
window.location.href = path
|
|
72
76
|
setHoveredMenu(null)
|
|
73
77
|
}
|
|
@@ -153,7 +157,7 @@ export function MainSidebar({
|
|
|
153
157
|
<Link
|
|
154
158
|
key={subItem.id}
|
|
155
159
|
href={subItem.href}
|
|
156
|
-
onClick={() => handleSubMenuClick(subItem.href)}
|
|
160
|
+
onClick={(e) => handleSubMenuClick(e,subItem.href)}
|
|
157
161
|
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
162
|
>
|
|
159
163
|
<subItem.icon className="h-4 w-4" />
|