Last active
July 2, 2016 00:28
-
-
Save vojtatranta/97cf7dc4b63dd3e14a38154ca9af5037 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var FlickrImageTime = React.createClass({ | |
render: function() { | |
return ( | |
<h3>Last updated: {moment(this.props.lastUpdate * 1000).fromNow()}</h3> | |
) | |
} | |
}) | |
var FlickrImage = React.createClass({ | |
render: function() { | |
// Render away! | |
return ( | |
<div className="flickr-image"> | |
<h1>{this.props.image.title}</h1> | |
<div className="flickr-image-container"> | |
<img src={this.props.image.imgUrl} /> | |
</div> | |
<h2>{this.props.image.ownerName} - {this.props.license}</h2> | |
<FlickrImageTime lastUpdate={this.props.image.lastUpdate} /> | |
<a href={this.props.image.flickrUrl}>{this.props.image.flickrUrl}</a> | |
</div> | |
); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment