Add 1 extra suspension minute

This commit is contained in:
Chi Vinh Le
2017-05-18 02:28:01 +07:00
parent 2bdf413b88
commit 492b973206
@@ -39,10 +39,13 @@ class SuspendUserDialog extends React.Component {
}
handlePerform = () => {
this.props.onPerform({
id: this.props.userId,
message: this.state.message,
until: dateAdd(new Date(), 'hour', this.state.duration),
// Add 1 minute more to help `timeago.js` to display the correct duration.
until: dateAdd(new Date(), 'minute', this.state.duration * 60 + 1),
});
};