From 06c7fc587f12d0b25c04df893fb7077d9e6a1308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Ch=C3=A1vez?= Date: Mon, 11 Mar 2024 14:54:26 -0600 Subject: [PATCH] Avoid using useCallback in trackVerticalScrolling --- src/pages/home/report/ReportActionsList.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pages/home/report/ReportActionsList.tsx b/src/pages/home/report/ReportActionsList.tsx index 748a30d75805..eba17a234112 100644 --- a/src/pages/home/report/ReportActionsList.tsx +++ b/src/pages/home/report/ReportActionsList.tsx @@ -323,12 +323,11 @@ function ReportActionsList({ } }; - const trackVerticalScrolling = useCallback((event: NativeSyntheticEvent) => { + const trackVerticalScrolling = (event: NativeSyntheticEvent) => { scrollingVerticalOffset.current = event.nativeEvent.contentOffset.y; handleUnreadFloatingButton(); onScroll?.(event); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + }; const scrollToBottomAndMarkReportAsRead = () => { reportScrollManager.scrollToBottom();