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
+2 -3
View File
@@ -22,19 +22,18 @@ const ReplyModal = ({ isOpen, closeModal }) => {
} = useGeneralStore(state => state);
const account = useAccount();
const setErrorMessage = useError();
const nodeRef = useRef(null);
const nameRef = useRef();
const commentRef = useRef();
const linkRef = useRef();
const [errorMessage, setErrorMessage] = useState(null);
const [triggerPublishComment, setTriggerPublishComment] = useState(false);
const [selectedText, setSelectedText] = useState('');
const [isMobile, setIsMobile] = useState(window.innerWidth <= 480);
useError(errorMessage, [errorMessage]);
useEffect(() => {
const handleResize = () => setIsMobile(window.innerWidth <= 480);