You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i try updating name of the group chat(renaming of group) it says fetchagain is not a function
const handleRename = async () => {
if (!groupChatName) return;
try {
setrenameLoading(true);
const config = {
headers: {
Authorization: `Bearer ${user.token}`
}
};
console.log("renamet to "+groupChatName);
var variable={
"chatId": selectedChat._id,
"name": groupChatName
}
console.log("details to rename "+JSON.stringify(variable));
const { data } = await axios.put("/api/chat/rename", {
chatId: selectedChat._id,
name: groupChatName
}, config);
console.log("Rename Success:", data);
setSelectedChat(data);
setFetchAgain(!fetchAgain);
setrenameLoading(false);
toast({
title: "done renaming",
status: "success",
duration: 5000,
isClosable: true,
position: "bottom",
});
} catch (error) {
console.log("error in renaming " + error);
toast({
title: "error in renaming",
status: "error",
duration: 5000,
isClosable: true,
position: "bottom",
});
setrenameLoading(false);
}
setgroupChatName("");
};
where is the problem ,have any one fixed this yet?
The text was updated successfully, but these errors were encountered:
when i try updating name of the group chat(renaming of group) it says fetchagain is not a function
const handleRename = async () => {
if (!groupChatName) return;
The text was updated successfully, but these errors were encountered: