// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. // See License.txt for license information. module.exports = React.createClass({ setPicture: function(file) { if (file) { var reader = new FileReader(); var img = this.refs.image.getDOMNode(); reader.onload = function (e) { $(img).attr('src', e.target.result) }; reader.readAsDataURL(file); } }, componentWillReceiveProps: function(nextProps) { if (nextProps.picture) { this.setPicture(nextProps.picture); } }, render: function() { var client_error = this.props.client_error ?
: null; var server_error = this.props.server_error ? : null; var img = null; if (this.props.picture) { img = (); } else { img = (); } var self = this; return ( ); } });