fix toasts

This commit is contained in:
plebeius.eth
2023-06-08 21:11:28 +02:00
parent 9198612156
commit 90693c6f75
9 changed files with 37 additions and 35 deletions
+3 -3
View File
@@ -34,7 +34,7 @@ const Pending = () => {
const account = useAccount();
const comment = useAccountComment({commentIndex: index});
const setErrorMessage = useError();
const [errorMessage, setErrorMessage] = useError();
useEffect(() => {
setSelectedAddress(comment?.subplebbitAddress);
@@ -53,10 +53,10 @@ const Pending = () => {
}, [comment?.state, comment?.error, index])
useEffect(() => {
if (errorString) {
if (errorString && errorString !== errorMessage) {
setErrorMessage(errorString);
}
}, [errorString, setErrorMessage]);
}, [errorString, setErrorMessage, errorMessage]);
const [visible] = useState(true);