fix: loop

This commit is contained in:
cha0s 2020-12-13 11:06:13 -06:00
parent 6153561643
commit c2d2bece0d

View File

@ -1,6 +1,6 @@
import './index.scss';
import {push} from 'connected-react-router';
import {replace} from 'connected-react-router';
import React, {useRef, useState} from 'react';
import {useDispatch, useSelector} from 'react-redux';
import {v4 as uuidv4} from 'uuid';
@ -48,7 +48,7 @@ export default function ChatSubmitMessage() {
return false;
});
if (areNotFriends) {
dispatch(push('/chat'));
dispatch(replace('/chat'));
return null;
}
return (