From b1a52c4205dd10528602bb577d2eb36b7019ed33 Mon Sep 17 00:00:00 2001 From: spaaaacccee Date: Mon, 29 Jul 2024 18:29:56 +1000 Subject: [PATCH] Hide navbar when scrolling --- src/components/AppBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AppBar.tsx b/src/components/AppBar.tsx index 6c391b3..5174700 100644 --- a/src/components/AppBar.tsx +++ b/src/components/AppBar.tsx @@ -47,7 +47,7 @@ function AppBarBody() { const sm = useSm(); const paper = usePaper(); const [top, setTop] = useState(true); - const scrolling = useScrollTrigger(); + const scrolling = useScrollTrigger({ target: document.body }); useEffect(() => { let cancelled = false; const f = () => {