Improve HK sidebar and restore nested content scrolling

This commit is contained in:
2026-09-05 12:50:52 +02:00
parent bf126fd825
commit 2578bf6a09
27 changed files with 184 additions and 20 deletions
+5 -1
View File
@@ -1,9 +1,12 @@
"use client";
import { Lenis } from "lenis/react";
import { usePathname } from "next/navigation";
import { useEffect, useState } from "react";
export function SmoothScroll() {
const pathname = usePathname();
const isAdmin = pathname === "/admin" || pathname?.startsWith("/admin/");
const [prefersReduced, setPrefersReduced] = useState(true);
useEffect(() => {
@@ -14,7 +17,8 @@ export function SmoothScroll() {
return () => mq.removeEventListener("change", onChange);
}, []);
if (prefersReduced) return null;
// Admin panels own their scroll containers; root wheel smoothing consumes their events.
if (prefersReduced || isAdmin) return null;
return (
<Lenis