This commit is contained in:
ahmed531998 2023-04-19 15:52:25 +02:00
parent 0c635fc096
commit 538a91e8fd
1 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ const ChatPage = () => {
setTimer((timer) => timer + 1);
}, 1000);
if(timer >= 30){
if(timer%30 == 0){
fetch(backendUrl + '/dm', {
method: 'POST',
body: JSON.stringify({ stat: stat, token: token }),
@ -63,7 +63,7 @@ const ChatPage = () => {
setNeedForm(value);
}
const deleteById = name => {
function deleteById(name){
setMessages(oldValues => {
return oldValues.filter(msg => msg.name !== name)
})