mirror of
https://github.com/Doodle3D/Doodle3D-Core.git
synced 2024-12-22 11:03:48 +01:00
move prototypes outside of class definition
This commit is contained in:
parent
401f847dfc
commit
4eb19157b6
@ -6,17 +6,6 @@ import PouchDB from 'pouchdb';
|
||||
// const debug = createDebug('d3d:FileThumb');
|
||||
|
||||
class AuthImage extends React.Component {
|
||||
static propTypes = {
|
||||
dispatch: PropTypes.func,
|
||||
src: PropTypes.string.isRequired,
|
||||
token: PropTypes.string,
|
||||
password: PropTypes.string
|
||||
};
|
||||
|
||||
state = {
|
||||
src: null
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
const { src, token, password } = this.props;
|
||||
|
||||
@ -57,6 +46,16 @@ class AuthImage extends React.Component {
|
||||
return (<img { ...props } src={this.state.src} />);
|
||||
}
|
||||
}
|
||||
AuthImage.propTypes = {
|
||||
dispatch: PropTypes.func,
|
||||
src: PropTypes.string.isRequired,
|
||||
token: PropTypes.string,
|
||||
password: PropTypes.string
|
||||
};
|
||||
AuthImage.state = {
|
||||
src: null
|
||||
};
|
||||
|
||||
|
||||
export default connect(state => ({
|
||||
token: state.user.session.token,
|
||||
|
Loading…
Reference in New Issue
Block a user