var React = require('react');
var dateToString = require('../util').dateToString;
var empty = none;
var DetailEntry = React.createClass({
render: function() {
return (
{this.props.name} |
{this.props.children || empty} |
)
}
});
function join(arr) {
if(arr) {
return arr.join(', ');
}
}
var Details = React.createClass({
render: function() {
var details = this.props.details.val();
return (
{details.plan.name} ({details.plan.price} {details.plan.currency})
{details.type}
{details.status}
{dateToString(new Date(details.created_on))}
{dateToString(new Date(details.modified_on))}
{join(details.name_servers)}
{join(details.original_name_servers)}
{details.original_dnshost}
{details.original_registrar}
);
}
});
module.exports = Details;