mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 13:37:13 +08:00
Use more concise error handling
This commit is contained in:
parent
e991d65a02
commit
c7da79a646
@ -55,6 +55,7 @@ export default class SuspendUserModal extends Modal {
|
||||
{this.status() === 'limited' ? (
|
||||
<div className="SuspendUserModal-days-input">
|
||||
<input type="number"
|
||||
min="0"
|
||||
value={this.daysRemaining()}
|
||||
oninput={m.withAttr('value', this.daysRemaining)}
|
||||
className="FormControl"/>
|
||||
@ -96,10 +97,7 @@ export default class SuspendUserModal extends Modal {
|
||||
|
||||
this.props.user.save({suspendUntil}).then(
|
||||
() => this.hide(),
|
||||
() => {
|
||||
this.loading = false;
|
||||
m.redraw();
|
||||
}
|
||||
this.loaded.bind(this)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user