fix: Handle error revoking share link on frontend
This commit is contained in:
parent
dd0d51dd9d
commit
759d4a5ac2
|
@ -31,10 +31,15 @@ class ShareMenu extends React.Component<Props> {
|
|||
this.redirectTo = this.props.share.documentUrl;
|
||||
};
|
||||
|
||||
handleRevoke = (ev: SyntheticEvent<>) => {
|
||||
handleRevoke = async (ev: SyntheticEvent<>) => {
|
||||
ev.preventDefault();
|
||||
this.props.shares.revoke(this.props.share);
|
||||
this.props.ui.showToast("Share link revoked");
|
||||
|
||||
try {
|
||||
await this.props.shares.revoke(this.props.share);
|
||||
this.props.ui.showToast("Share link revoked");
|
||||
} catch (err) {
|
||||
this.props.ui.showToast(err.message);
|
||||
}
|
||||
};
|
||||
|
||||
handleCopy = () => {
|
||||
|
|
Reference in New Issue