mirror of
https://github.com/outline/outline.git
synced 2026-11-30 17:10:36 +03:00
fix: Handle error revoking share link on frontend
This commit is contained in:
1 parent
dd0d51dd9d
commit
759d4a5ac2
1 file changed
+8
-3
@@ -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
Block a user