mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-01-27 13:16:18 +00:00
fix seconds
This commit is contained in:
parent
f6a1a7bfe1
commit
d33e8c7cb2
@ -1,4 +1,9 @@
|
|||||||
span
|
span
|
||||||
span= this.props.duration / 1000
|
if this.props.minutes
|
||||||
|
span= this.props.minutes
|
||||||
|
|
|
||||||
|
span min
|
||||||
|
|
|
||||||
|
span= this.state.seconds
|
||||||
|
|
|
|
||||||
span sec
|
span sec
|
||||||
|
@ -4,6 +4,14 @@ define([
|
|||||||
'react', 'templates/app/components/common/duration/index'
|
'react', 'templates/app/components/common/duration/index'
|
||||||
], function(React, template) {
|
], function(React, template) {
|
||||||
return React.createClass({
|
return React.createClass({
|
||||||
render: template
|
render: template,
|
||||||
|
getInitialState: function() {
|
||||||
|
var seconds = Math.round(this.props.duration / 1000);
|
||||||
|
|
||||||
|
return {
|
||||||
|
minutes: null,
|
||||||
|
seconds: seconds
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user