nci/static/js/app/components/common/duration/index.js

18 lines
322 B
JavaScript
Raw Normal View History

2015-07-21 20:00:09 +00:00
'use strict';
define([
'react', 'templates/app/components/common/duration/index'
], function(React, template) {
return React.createClass({
2015-07-26 13:14:57 +00:00
render: template,
getInitialState: function() {
var seconds = Math.round(this.props.duration / 1000);
return {
minutes: null,
seconds: seconds
}
}
2015-07-21 20:00:09 +00:00
});
});