mirror of
https://github.com/cupcakearmy/old.nicco.io.git
synced 2024-11-01 00:24:16 +01:00
remove unused code
This commit is contained in:
parent
51c6b1b461
commit
80dd00b449
10
src/util.ts
10
src/util.ts
@ -1,16 +1,12 @@
|
|||||||
import { useEffect, useState } from 'react'
|
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<boolean>(false)
|
let [present, setPresent] = useState<boolean>(false)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const enter = ()=> setPresent(true)
|
const enter = () => setPresent(true)
|
||||||
const leave = ()=> setPresent(false)
|
const leave = () => setPresent(false)
|
||||||
window.document.addEventListener('mouseenter', enter)
|
window.document.addEventListener('mouseenter', enter)
|
||||||
window.document.addEventListener('mouseleave', leave)
|
window.document.addEventListener('mouseleave', leave)
|
||||||
return () => {
|
return () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user