I have added intervals for messages
This commit is contained in:
parent
49a8af611f
commit
8fecf7cb1f
@ -116,7 +116,12 @@ const Chat = () => {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
retrieveMessages().then();
|
// retrieveMessages().then();
|
||||||
|
const interval = setInterval(() => {
|
||||||
|
retrieveMessages().then()
|
||||||
|
}, 2000);
|
||||||
|
|
||||||
|
return () => clearInterval(interval)
|
||||||
}, [myId, interlocutorId]);
|
}, [myId, interlocutorId]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user