mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix eslint
This commit is contained in:
@@ -114,11 +114,12 @@ const Board = () => {
|
||||
setOpenMenuCid(null);
|
||||
};
|
||||
|
||||
const handleOutsideClick = (e) => {
|
||||
const handleOutsideClick = useCallback((e) => {
|
||||
if (openMenuCid !== null && !postMenuRef.current.contains(e.target) && !postMenuCatalogRef.current.contains(e.target)) {
|
||||
setOpenMenuCid(null);
|
||||
}
|
||||
};
|
||||
}, [openMenuCid, postMenuRef, postMenuCatalogRef]);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
if (openMenuCid !== null) {
|
||||
@@ -130,7 +131,7 @@ const Board = () => {
|
||||
return () => {
|
||||
document.removeEventListener('click', handleOutsideClick);
|
||||
};
|
||||
}, [openMenuCid]);
|
||||
}, [openMenuCid, handleOutsideClick]);
|
||||
|
||||
|
||||
|
||||
@@ -458,7 +459,7 @@ const Board = () => {
|
||||
if (editedComment !== '') {
|
||||
setTriggerPublishCommentEdit(true);
|
||||
}
|
||||
}, [editedComment]);
|
||||
}, [editedComment, setIsAuthorEdit]);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -103,11 +103,11 @@ const Catalog = () => {
|
||||
setOpenMenuCid(null);
|
||||
};
|
||||
|
||||
const handleOutsideClick = (e) => {
|
||||
const handleOutsideClick = useCallback((e) => {
|
||||
if (openMenuCid !== null && !postMenuRef.current.contains(e.target) && !postMenuCatalogRef.current.contains(e.target)) {
|
||||
setOpenMenuCid(null);
|
||||
}
|
||||
};
|
||||
}, [openMenuCid, postMenuRef, postMenuCatalogRef]);
|
||||
|
||||
useEffect(() => {
|
||||
if (openMenuCid !== null) {
|
||||
@@ -119,7 +119,7 @@ const Catalog = () => {
|
||||
return () => {
|
||||
document.removeEventListener('click', handleOutsideClick);
|
||||
};
|
||||
}, [openMenuCid]);
|
||||
}, [openMenuCid, handleOutsideClick]);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -116,11 +116,11 @@ const Thread = () => {
|
||||
setOpenMenuCid(null);
|
||||
};
|
||||
|
||||
const handleOutsideClick = (e) => {
|
||||
const handleOutsideClick = useCallback((e) => {
|
||||
if (openMenuCid !== null && !postMenuRef.current.contains(e.target) && !postMenuCatalogRef.current.contains(e.target)) {
|
||||
setOpenMenuCid(null);
|
||||
}
|
||||
};
|
||||
}, [openMenuCid, postMenuRef, postMenuCatalogRef]);
|
||||
|
||||
useEffect(() => {
|
||||
if (openMenuCid !== null) {
|
||||
@@ -132,7 +132,7 @@ const Thread = () => {
|
||||
return () => {
|
||||
document.removeEventListener('click', handleOutsideClick);
|
||||
};
|
||||
}, [openMenuCid]);
|
||||
}, [openMenuCid, handleOutsideClick]);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user