fix seconds

This commit is contained in:
Vladimir Polyakov 2015-07-26 16:14:57 +03:00
parent f6a1a7bfe1
commit d33e8c7cb2
2 changed files with 15 additions and 2 deletions

View File

@ -1,4 +1,9 @@
span
span= this.props.duration / 1000
if this.props.minutes
span= this.props.minutes
|
span min
|
span= this.state.seconds
|
span sec

View File

@ -4,6 +4,14 @@ define([
'react', 'templates/app/components/common/duration/index'
], function(React, template) {
return React.createClass({
render: template
render: template,
getInitialState: function() {
var seconds = Math.round(this.props.duration / 1000);
return {
minutes: null,
seconds: seconds
}
}
});
});