mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +03:00
groups: add group deletion confirmation
This commit is contained in:
parent
d136c50ccc
commit
4b130868ed
@ -324,12 +324,14 @@ export class GroupDetail extends Component {
|
||||
<a className={'dib f9 ba pa2 ' + deleteButtonClasses}
|
||||
onClick={() => {
|
||||
if (groupOwner) {
|
||||
if (prompt(`To confirm deleting this group, type ${props.path.substr(6)}`) === props.path.substr(6)) {
|
||||
this.setState({ awaiting: true, type: 'Deleting' }, (() => {
|
||||
props.api.contacts.delete(props.path).then(() => {
|
||||
props.history.push('/~groups');
|
||||
});
|
||||
}));
|
||||
}
|
||||
}
|
||||
}}
|
||||
>Delete this group</a>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user