@orsetra/shared-ui 1.0.49 → 1.0.51
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.
|
@@ -66,9 +66,12 @@ export function MainSidebar({
|
|
|
66
66
|
|
|
67
67
|
const handleSubMenuClick = (e: React.MouseEvent, href: string) => {
|
|
68
68
|
e.preventDefault()
|
|
69
|
+
console.log('handleSubMenuClick - href:', href)
|
|
69
70
|
const path = href.startsWith('http://') || href.startsWith('https://')
|
|
70
71
|
? new URL(href).pathname
|
|
71
72
|
: href
|
|
73
|
+
console.log('handleSubMenuClick - path:', path)
|
|
74
|
+
console.log('Redirecting to:', path)
|
|
72
75
|
window.location.href = path
|
|
73
76
|
setHoveredMenu(null)
|
|
74
77
|
}
|
|
@@ -151,15 +154,15 @@ export function MainSidebar({
|
|
|
151
154
|
</div>
|
|
152
155
|
<div className="py-1">
|
|
153
156
|
{sidebarMenus[item.id].map((subItem) => (
|
|
154
|
-
<
|
|
157
|
+
<a
|
|
155
158
|
key={subItem.id}
|
|
156
159
|
href={subItem.href}
|
|
157
|
-
onClick={(e) => handleSubMenuClick(e,subItem.href)}
|
|
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"
|
|
160
|
+
onClick={(e) => handleSubMenuClick(e, subItem.href)}
|
|
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 no-underline"
|
|
159
162
|
>
|
|
160
163
|
<subItem.icon className="h-4 w-4" />
|
|
161
164
|
{subItem.name}
|
|
162
|
-
</
|
|
165
|
+
</a>
|
|
163
166
|
))}
|
|
164
167
|
</div>
|
|
165
168
|
</div>
|