mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-04-23 19:37:52 +00:00
error snack for blocked user
This commit is contained in:
parent
534301294e
commit
8f8b7fc0cd
@ -25,7 +25,7 @@ export const BlockedUsersModal = () => {
|
|||||||
const [value, setValue] = useState("");
|
const [value, setValue] = useState("");
|
||||||
const [addressesWithNames, setAddressesWithNames] = useState({})
|
const [addressesWithNames, setAddressesWithNames] = useState({})
|
||||||
const { isShow, onCancel, onOk, show, message } = useModal();
|
const { isShow, onCancel, onOk, show, message } = useModal();
|
||||||
const { getAllBlockedUsers, removeBlockFromList, addToBlockList } =
|
const { getAllBlockedUsers, removeBlockFromList, addToBlockList, setOpenSnackGlobal, setInfoSnackCustom } =
|
||||||
useContext(MyContext);
|
useContext(MyContext);
|
||||||
const [blockedUsers, setBlockedUsers] = useState({
|
const [blockedUsers, setBlockedUsers] = useState({
|
||||||
addresses: {},
|
addresses: {},
|
||||||
@ -115,7 +115,12 @@ export const BlockedUsersModal = () => {
|
|||||||
executeEvent('updateChatMessagesWithBlocks', true)
|
executeEvent('updateChatMessagesWithBlocks', true)
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
setOpenSnackGlobal(true);
|
||||||
|
|
||||||
|
setInfoSnackCustom({
|
||||||
|
type: "error",
|
||||||
|
message: error?.message || "Unable to block user",
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const blockUserFromOutsideModalFunc = (e) => {
|
const blockUserFromOutsideModalFunc = (e) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user