From 80dd00b4498cbd4d0ab873e2676293aead34572a Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 6 Mar 2019 00:17:11 +0100 Subject: [PATCH] remove unused code --- src/util.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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 () => {