Mr.Combet Webshell
Your IP :
216.73.216.136
Server IP :
103.233.58.157
Server :
Windows NT WIN-4PGF72KEHKB 10.0 build 17763 (Windows Server 2016) AMD64
Server Software :
Microsoft-IIS/10.0
PHP Version :
7.3.25
Add File :
Submit
Add Directory :
Submit
Dir :
C:
/
inetpub
/
wwwroot
/
IRC
/
ClientApp
/
src
/
hooks
/
View File Name :
useOutsideClick.tsx
import React, { useEffect } from "react"; const useOutsideClick = (ref, setDrop, parentRef) => { function handleClickOutside(event) { if (parentRef) { if (ref.current && !ref.current.contains(event.target)) { if (!parentRef.current.contains(event.target)) { setDrop && setDrop(); } } } else { if (ref.current && !ref.current.contains(event.target)) { setDrop && setDrop(); } } } useEffect(() => { // Bind the event listener document.addEventListener("mousedown", handleClickOutside); return () => { // Unbind the event listener on clean up document.removeEventListener("mousedown", handleClickOutside); }; }); }; export default useOutsideClick;