import { useEffect } from 'react';

export function usePreventWheel() {
  useEffect(() => {
    const handleWheel = (e: any) => {
      // @ts-ignore
      if (document.activeElement?.type === 'number') {
        e.preventDefault();
      }
    };
    window.addEventListener('wheel', handleWheel, { passive: false });
    return () => {
      window.removeEventListener('wheel', handleWheel);
    };
  }, []);
}
