Handle API errors when failing to join group
This commit is contained in:
@ -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 = () =>
|
||||
|
||||
Reference in New Issue
Block a user