Handle API errors when failing to join group
This commit is contained in:
parent
90f7c71256
commit
2c59933cd0
|
@ -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 = () =>
|
||||
|
|
Loading…
Reference in New Issue