refactor toasts

This commit is contained in:
Tom
2023-06-07 21:24:17 +02:00
parent 37d49668e4
commit 4ae1eb5e19
14 changed files with 66 additions and 67 deletions
Regular → Executable
+2 -4
View File
@@ -34,6 +34,7 @@ const Pending = () => {
const account = useAccount();
const comment = useAccountComment({commentIndex: index});
const setErrorMessage = useError();
useEffect(() => {
setSelectedAddress(comment?.subplebbitAddress);
@@ -55,13 +56,10 @@ const Pending = () => {
if (errorString) {
setErrorMessage(errorString);
}
}, [errorString]);
}, [errorString, setErrorMessage]);
const [visible] = useState(true);
const [errorMessage, setErrorMessage] = useState(null);
useError(errorMessage, [errorMessage]);
const navigate = useNavigate();
const [commentMediaInfo, setCommentMediaInfo] = useState(null);
const fallbackImgUrl = "assets/filedeleted-res.gif";