revert to fix hooks deps

This commit is contained in:
Tom
2023-04-26 14:24:08 +02:00
parent 6995684519
commit 649964f26b
4 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -75,7 +75,7 @@ const Thread = () => {
parentCids: [
selectedThread || 'n/a', ...flattenedReplies.map(reply => reply.cid)
]
}), [flattenedReplies, selectedThread]);
}), [flattenedReplies]);
const { accountComments } = useAccountComments({filter});
@@ -100,7 +100,7 @@ const Thread = () => {
if (selectedSubplebbit) {
setSelectedTitle(selectedSubplebbit.title);
}
}, [subplebbitAddress, setSelectedAddress, setSelectedTitle, defaultSubplebbits, setSelectedThread, threadCid]);
}, [subplebbitAddress, setSelectedAddress, setSelectedTitle, defaultSubplebbits]);
// mobile navbar scroll effect
useEffect(() => {
@@ -167,7 +167,7 @@ const Thread = () => {
if (index !== undefined) {
setPendingCommentIndex(index);
}
}, [index, setPendingCommentIndex]);
}, [index]);
const resetFields = () => {
@@ -205,7 +205,7 @@ const Thread = () => {
resetFields();
})();
}
}, [publishCommentOptions, publishComment]);
}, [publishCommentOptions]);
const getChallengeAnswersFromUser = async (challenges) => {