aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/utilities/useScrollToTop.ts
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-06-04 15:05:36 +0800
committercrupest <crupest@outlook.com>2021-06-04 15:05:36 +0800
commit924e420dbcda5a8658f65dcb98a9140c97f52cd2 (patch)
treeb142661bf33cc3312db7427484cd2fe77af9cd5f /FrontEnd/src/app/utilities/useScrollToTop.ts
parent5a96a88121f3ecb846c5cd55c3f51624b4e21402 (diff)
downloadtimeline-924e420dbcda5a8658f65dcb98a9140c97f52cd2.tar.gz
timeline-924e420dbcda5a8658f65dcb98a9140c97f52cd2.tar.bz2
timeline-924e420dbcda5a8658f65dcb98a9140c97f52cd2.zip
chore: Remove debug logs.
Diffstat (limited to 'FrontEnd/src/app/utilities/useScrollToTop.ts')
-rw-r--r--FrontEnd/src/app/utilities/useScrollToTop.ts8
1 files changed, 1 insertions, 7 deletions
diff --git a/FrontEnd/src/app/utilities/useScrollToTop.ts b/FrontEnd/src/app/utilities/useScrollToTop.ts
index da63cb0a..892e3545 100644
--- a/FrontEnd/src/app/utilities/useScrollToTop.ts
+++ b/FrontEnd/src/app/utilities/useScrollToTop.ts
@@ -1,6 +1,6 @@
import React from "react";
import { fromEvent } from "rxjs";
-import { filter, throttleTime, tap } from "rxjs/operators";
+import { filter, throttleTime } from "rxjs/operators";
function useScrollToTop(
handler: () => void,
@@ -23,11 +23,6 @@ function useScrollToTop(
React.useEffect(() => {
const subscription = fromEvent(window, "scroll")
.pipe(
- tap(() => {
- console.log(
- `Scroll event fired: ${window.scrollY}, time: ${Date.now()}.`
- );
- }),
filter(() => {
return window.scrollY <= option.maxOffset;
}),
@@ -35,7 +30,6 @@ function useScrollToTop(
)
.subscribe(() => {
if (enable) {
- console.log(`Fire scroll to top event, time: ${Date.now()}.`);
handlerRef.current?.();
}
});