mirror of
https://github.com/wnlen/clash-for-linux.git
synced 2024-12-23 00:17:27 +08:00
2 lines
355 B
JavaScript
2 lines
355 B
JavaScript
import{i as r}from"./index.171f553a.js";const{useState:s,useRef:u,useCallback:a,useLayoutEffect:c}=r;function d(){const t=u(null),[n,i]=s(200),e=a(()=>{const{top:o}=t.current.getBoundingClientRect();i(window.innerHeight-o)},[]);return c(()=>(e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}),[e]),[t,n]}export{d as u};
|