Handle API errors when failing to join group

This commit is contained in:
Chewbacca 2023-05-11 15:00:28 -04:00
parent 90f7c71256
commit 2c59933cd0
1 changed files with 6 additions and 0 deletions

View File

@ -55,6 +55,12 @@ const GroupActionButton = ({ group }: IGroupActionButton) => {
: intl.formatMessage(messages.joinSuccess),
);
},
onError(error) {
const message = (error.response?.data as any).error;
if (message) {
toast.error(message);
}
},
});
const onLeaveGroup = () =>