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 39cf7d1 commit 814f86fCopy full SHA for 814f86f
src/components/BackToTop/BackToTop.tsx
@@ -16,7 +16,7 @@ const BackToTop =() => {
16
17
document.getElementById("root")?.addEventListener('scroll', (e) => {
18
if (e.target === null) {return}
19
- let CurrentScrollHeight = e.target.scrollTop
+ let CurrentScrollHeight = (e.target as HTMLElement).scrollTop
20
let WindowHeight = window.innerHeight
21
22
if ( CurrentScrollHeight > WindowHeight / 2) {
0 commit comments