diff --git a/src/util.ts b/src/util.ts index b1dea6f..adddae9 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1,16 +1,12 @@ import { useEffect, useState } from 'react' -const getSize = () => { - const { innerHeight, innerWidth, outerHeight, outerWidth } = window - return { innerHeight, innerWidth, outerHeight, outerWidth } -} -export const useIsMousePresent = ()=> { +export const useIsMousePresent = () => { let [present, setPresent] = useState(false) useEffect(() => { - const enter = ()=> setPresent(true) - const leave = ()=> setPresent(false) + const enter = () => setPresent(true) + const leave = () => setPresent(false) window.document.addEventListener('mouseenter', enter) window.document.addEventListener('mouseleave', leave) return () => {