mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Prefer arrow functions (#2344)
This commit is contained in:
parent
e05acd6fd9
commit
a20f3240fd
19 changed files with 304 additions and 336 deletions
|
@ -62,10 +62,10 @@ interface LayerUIProps {
|
|||
lng: string;
|
||||
}
|
||||
|
||||
function useOnClickOutside(
|
||||
const useOnClickOutside = (
|
||||
ref: RefObject<HTMLElement>,
|
||||
cb: (event: MouseEvent) => void,
|
||||
) {
|
||||
) => {
|
||||
useEffect(() => {
|
||||
const listener = (event: MouseEvent) => {
|
||||
if (!ref.current) {
|
||||
|
@ -88,7 +88,7 @@ function useOnClickOutside(
|
|||
document.removeEventListener("pointerdown", listener);
|
||||
};
|
||||
}, [ref, cb]);
|
||||
}
|
||||
};
|
||||
|
||||
const LibraryMenuItems = ({
|
||||
library,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue