@orsetra/shared-ui 1.0.50 → 1.0.52

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.
@@ -154,15 +154,15 @@ export function MainSidebar({
154
154
  </div>
155
155
  <div className="py-1">
156
156
  {sidebarMenus[item.id].map((subItem) => (
157
- <Link
157
+ <a
158
158
  key={subItem.id}
159
159
  href={subItem.href}
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"
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"
162
162
  >
163
163
  <subItem.icon className="h-4 w-4" />
164
164
  {subItem.name}
165
- </Link>
165
+ </a>
166
166
  ))}
167
167
  </div>
168
168
  </div>
@@ -242,10 +242,25 @@ function Sidebar({ currentMenu, onMainMenuToggle, sidebarMenus = {}, main_base_u
242
242
  <nav className="flex-1 px-3 py-4 space-y-1 overflow-y-auto">
243
243
  {currentNavigation.map((item) => {
244
244
  const isActive = pathname === item.href || pathname.startsWith(`${item.href}/`)
245
+
246
+ const handleClick = (e: React.MouseEvent) => {
247
+ e.preventDefault()
248
+ console.log('Sidebar handleClick - item.name:', item.name)
249
+ console.log('Sidebar handleClick - item.href:', item.href)
250
+ const href = item.href
251
+ const path = href.startsWith('http://') || href.startsWith('https://')
252
+ ? new URL(href).pathname
253
+ : href
254
+ console.log('Sidebar handleClick - path:', path)
255
+ console.log('Navigating to:', path)
256
+ window.location.href = path
257
+ }
258
+
245
259
  return (
246
260
  <Link
247
261
  key={item.name}
248
262
  href={item.href}
263
+ onClick={handleClick}
249
264
  className={cn(
250
265
  "flex items-center px-3 py-2 text-sm rounded-md gap-x-3 transition-colors",
251
266
  isActive
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orsetra/shared-ui",
3
- "version": "1.0.50",
3
+ "version": "1.0.52",
4
4
  "description": "Shared UI components for Orsetra platform",
5
5
  "main": "./index.ts",
6
6
  "types": "./index.ts",