fix all missing deps except for bugged one

This commit is contained in:
Tom
2023-04-27 11:42:51 +02:00
parent 428b335cfc
commit 4e1575f5fc
4 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ const ReplyModal = ({ isOpen, closeModal }) => {
if (index !== undefined) {
setPendingCommentIndex(index);
}
}, [index, location]);
}, [index, location, setPendingCommentIndex]);
const resetFields = () => {
+1 -2
View File
@@ -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 = () => {
+1 -1
View File
@@ -133,7 +133,7 @@ const Catalog = () => {
setPendingCommentIndex(index);
navigate(`/profile/c/${index}`);
}
}, [index]);
}, [index, navigate, setPendingCommentIndex]);
const resetFields = () => {
+3 -3
View File
@@ -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 = () => {