Skip to content

Commit 8bac0d0

Browse files
Update web/src/components/ScrollUpButton.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent bb1feb7 commit 8bac0d0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

web/src/components/ScrollUpButton.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ export const ScrollUpButton = () => {
55

66
useEffect(() => {
77
window.addEventListener("scroll", toggleVisible);
8+
return () => {
9+
window.removeEventListener("scroll", toggleVisible);
10+
};
811
}, []);
912

1013
const toggleVisible = () => {

0 commit comments

Comments
 (0)