mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix all missing deps except for bugged one
This commit is contained in:
@@ -83,7 +83,7 @@ const ReplyModal = ({ isOpen, closeModal }) => {
|
||||
if (index !== undefined) {
|
||||
setPendingCommentIndex(index);
|
||||
}
|
||||
}, [index, location]);
|
||||
}, [index, location, setPendingCommentIndex]);
|
||||
|
||||
|
||||
const resetFields = () => {
|
||||
|
||||
@@ -64,7 +64,6 @@ const Board = () => {
|
||||
|
||||
const account = useAccount();
|
||||
|
||||
|
||||
const flattenedRepliesByThread = useMemo(() => {
|
||||
return selectedFeed.reduce((acc, thread) => {
|
||||
const replies = flattenCommentsPages(thread.replies);
|
||||
@@ -207,7 +206,7 @@ const Board = () => {
|
||||
setPendingCommentIndex(index);
|
||||
navigate(`/profile/c/${index}`);
|
||||
}
|
||||
}, [index]);
|
||||
}, [index, navigate, setPendingCommentIndex]);
|
||||
|
||||
|
||||
const resetFields = () => {
|
||||
|
||||
@@ -133,7 +133,7 @@ const Catalog = () => {
|
||||
setPendingCommentIndex(index);
|
||||
navigate(`/profile/c/${index}`);
|
||||
}
|
||||
}, [index]);
|
||||
}, [index, navigate, setPendingCommentIndex]);
|
||||
|
||||
|
||||
const resetFields = () => {
|
||||
|
||||
@@ -75,7 +75,7 @@ const Thread = () => {
|
||||
parentCids: [
|
||||
selectedThread || 'n/a', ...flattenedReplies.map(reply => reply.cid)
|
||||
]
|
||||
}), [flattenedReplies]);
|
||||
}), [flattenedReplies, selectedThread]);
|
||||
|
||||
|
||||
const { accountComments } = useAccountComments({filter});
|
||||
@@ -100,7 +100,7 @@ const Thread = () => {
|
||||
if (selectedSubplebbit) {
|
||||
setSelectedTitle(selectedSubplebbit.title);
|
||||
}
|
||||
}, [subplebbitAddress, setSelectedAddress, setSelectedTitle, defaultSubplebbits]);
|
||||
}, [subplebbitAddress, setSelectedAddress, setSelectedTitle, defaultSubplebbits, setSelectedThread, threadCid]);
|
||||
|
||||
// mobile navbar scroll effect
|
||||
useEffect(() => {
|
||||
@@ -167,7 +167,7 @@ const Thread = () => {
|
||||
if (index !== undefined) {
|
||||
setPendingCommentIndex(index);
|
||||
}
|
||||
}, [index]);
|
||||
}, [index, setPendingCommentIndex]);
|
||||
|
||||
|
||||
const resetFields = () => {
|
||||
|
||||
Reference in New Issue
Block a user