fix: Sidebar positioning - remove inset-y-0 conflict

- Fixed sidebar to not use inset-y-0 (was overriding top offset)
- Mobile: fixed positioning with sidebarTopClass
- Desktop: lg:sticky for proper sticky behavior
This commit is contained in:
Dwindi Ramadhana
2026-01-04 12:30:46 +07:00
parent bfb961ccbe
commit 3a8c436839

View File

@@ -96,14 +96,16 @@ export default function Help() {
{sidebarOpen ? <X className="w-5 h-5" /> : <Menu className="w-5 h-5" />} {sidebarOpen ? <X className="w-5 h-5" /> : <Menu className="w-5 h-5" />}
</Button> </Button>
{/* Sidebar - sticky, positioned below header */} {/* Sidebar - sticky on desktop, fixed on mobile */}
<aside <aside
className={cn( className={cn(
"w-72 border-r bg-muted/30 flex-shrink-0", "w-72 border-r bg-muted/30 flex-shrink-0 overflow-y-auto",
"fixed lg:sticky inset-y-0 left-0 z-40", // Mobile: fixed position covering from below header
"fixed left-0 z-40",
sidebarTopClass, sidebarTopClass,
sidebarHeightClass, sidebarHeightClass,
"lg:block overflow-y-auto", // Desktop: sticky instead of fixed
"lg:sticky",
sidebarOpen ? "block" : "hidden lg:block" sidebarOpen ? "block" : "hidden lg:block"
)} )}
> >