var CameraCell = React.createClass({
preview: function() {
var jpg = this.props.camera.urls.jpg;
if(!jpg) {
return require('image!not-available');
}
var jpg1 = jpg.indexOf("?") == -1 ? jpg + "?_v=" + this.props.camera.vsn : "&_v=" + this.props.camera.vsn;
//console.log(
this.props.camera);
return {uri: jpg1 + "&token=" + this.props.camera.auth_token};
},
render: function() {
return <Image source={this.preview()} defaultSource={require('image!not-available')} style={styles.cellImage} />;
}
});