import { useEffect } from 'react';
const useOnScroll = (fnCallback) => {
    useEffect(() => {
        document.addEventListener('scroll', fnCallback, false);
        return () => {
            document.removeEventListener('scroll', fnCallback, false);
        };
    });
};
export default useOnScroll;
