Add useEffect dependency and remove unused import

This commit is contained in:
Joshua Sigona 2021-07-11 18:57:50 +09:00
parent e07379b564
commit 13f29810bd

View File

@ -1,6 +1,6 @@
import './App.css';
import React, {useState,useEffect,useRef} from 'react';
import ReactWindow from 'reactjs-windows'
//import ReactWindow from 'reactjs-windows'
import 'reactjs-windows/dist/index.css'
function Col(p) {
@ -135,7 +135,7 @@ function useOutsideAlerter(ref,setEdit) {
// Unbind the event listener on clean up
document.removeEventListener("mousedown", handleClickOutside);
};
}, [ref]);
}, [ref,setEdit]);
}