import type { RefObject } from 'react'; /** * Hook to follow scroll position without rerendering the view. * Modified to ES6 and work with SSR (fixed window undefined error) and Rocket architecture from https://www.npmjs.com/package/@n8tb1t/use-scroll-position */ interface ScrollPosition { x: number; y: number; } interface ScrollPositionProps { prevPos: ScrollPosition; currPos: ScrollPosition; } declare const useScrollPosition: (effect: { ({ prevPos, currPos }: ScrollPositionProps): void; }, element?: RefObject, useWindow?: boolean, wait?: number) => void; export default useScrollPosition;