fix: loop
This commit is contained in:
parent
6153561643
commit
c2d2bece0d
|
@ -1,6 +1,6 @@
|
||||||
import './index.scss';
|
import './index.scss';
|
||||||
|
|
||||||
import {push} from 'connected-react-router';
|
import {replace} from 'connected-react-router';
|
||||||
import React, {useRef, useState} from 'react';
|
import React, {useRef, useState} from 'react';
|
||||||
import {useDispatch, useSelector} from 'react-redux';
|
import {useDispatch, useSelector} from 'react-redux';
|
||||||
import {v4 as uuidv4} from 'uuid';
|
import {v4 as uuidv4} from 'uuid';
|
||||||
|
@ -48,7 +48,7 @@ export default function ChatSubmitMessage() {
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
if (areNotFriends) {
|
if (areNotFriends) {
|
||||||
dispatch(push('/chat'));
|
dispatch(replace('/chat'));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user