We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18080f1 commit 3f19810Copy full SHA for 3f19810
src/components/ui/floating-action-button.tsx
@@ -8,15 +8,13 @@ interface FloatingActionButtonProps {
8
9
export function FloatingActionButton({ onClick, visible = true }: FloatingActionButtonProps) {
10
const [isVisible, setIsVisible] = useState(visible);
11
- const [isScrollingUp, setIsScrollingUp] = useState(false);
12
const [lastScrollY, setLastScrollY] = useState(0);
13
14
useEffect(() => {
15
const handleScroll = () => {
16
const currentScrollY = window.scrollY;
17
// Determine if scrolling up
18
const isScrollUp = currentScrollY < lastScrollY;
19
- setIsScrollingUp(isScrollUp);
20
21
// Update the last scroll position
22
setLastScrollY(currentScrollY);
0 commit comments