From 7c28730f1c3765ad1eaac4755f3b2bd3211b3c8b Mon Sep 17 00:00:00 2001 From: Jahongir Yusupov <91022355+jahongiry@users.noreply.github.com> Date: Tue, 5 Mar 2024 19:56:53 +0500 Subject: [PATCH] Fix bug in chat --- src/pages/chat/Chat.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/pages/chat/Chat.js b/src/pages/chat/Chat.js index 247489d..dd8a3de 100644 --- a/src/pages/chat/Chat.js +++ b/src/pages/chat/Chat.js @@ -17,14 +17,6 @@ import send_icon from '../../img/icons/send_icon.svg'; import ChatFinishBuyer from './chatFinish/chatFinishBuyer'; import ChatFinishSeller from './chatFinish/chatFinishSeller'; -function preventScroll(e) { - e.preventDefault(); - e.stopPropagation(); - return false; -} - -document.addEventListener('scroll', preventScroll, { passive: false }); - const Chat = () => { const dispatch = useDispatch(); const [inputValue, setInputValue] = useState(''); @@ -35,7 +27,7 @@ const Chat = () => { const user = useSelector((state) => state.auth.user); const [isPopupVisible, setIsPopupVisible] = useState(false); const messagesEndRef = useRef(null); - console.log(chats[selectedChatId].offer.status); + // console.log(chats[selectedChatId].offer.status); useEffect(() => { if (!selectedChatId || !chatUsers) {