diff --git a/src/components/Tooltip/EducationalTooltip/BaseEducationalTooltip.tsx b/src/components/Tooltip/EducationalTooltip/BaseEducationalTooltip.tsx index 71de7f51a091..32b29c803b15 100644 --- a/src/components/Tooltip/EducationalTooltip/BaseEducationalTooltip.tsx +++ b/src/components/Tooltip/EducationalTooltip/BaseEducationalTooltip.tsx @@ -12,9 +12,6 @@ import measureTooltipCoordinate, {getTooltipCoordinates} from './measureTooltipC type LayoutChangeEventWithTarget = NativeSyntheticEvent<{layout: LayoutRectangle; target: HTMLElement}>; -type ScrollingEventData = { - isScrolling: boolean; -}; /** * A component used to wrap an element intended for displaying a tooltip. * This tooltip would show immediately without user's interaction and hide after 5 seconds. @@ -109,7 +106,7 @@ function BaseEducationalTooltip({children, shouldRender = false, shouldHideOnNav } setTooltipPosition(false); - const scrollingListener = DeviceEventEmitter.addListener(CONST.EVENTS.SCROLLING, ({isScrolling}: ScrollingEventData = {isScrolling: false}) => { + const scrollingListener = DeviceEventEmitter.addListener(CONST.EVENTS.SCROLLING, (isScrolling: boolean) => { setTooltipPosition(isScrolling); }); diff --git a/src/hooks/useScrollEventEmitter.ts b/src/hooks/useScrollEventEmitter.ts index e9ba0f155528..23b9b644887d 100644 --- a/src/hooks/useScrollEventEmitter.ts +++ b/src/hooks/useScrollEventEmitter.ts @@ -11,9 +11,7 @@ const useScrollEventEmitter = () => { const triggerScrollEvent = useCallback(() => { const emitScrolling = (isScrolling: boolean) => { - DeviceEventEmitter.emit(CONST.EVENTS.SCROLLING, { - isScrolling, - }); + DeviceEventEmitter.emit(CONST.EVENTS.SCROLLING, isScrolling); }; // Start emitting the scrolling event when the scroll begins