From 924e420dbcda5a8658f65dcb98a9140c97f52cd2 Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 4 Jun 2021 15:05:36 +0800 Subject: chore: Remove debug logs. --- FrontEnd/src/app/utilities/useScrollToTop.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'FrontEnd/src/app/utilities/useScrollToTop.ts') 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?.(); } }); -- cgit v1.2.3