From 4eb19157b672eaa964d31991dedf1ad4a003ac06 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Thu, 2 Nov 2017 17:35:29 +0100 Subject: [PATCH] move prototypes outside of class definition --- src/components/AuthImage.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/components/AuthImage.js b/src/components/AuthImage.js index 216f9fe..6db87af 100644 --- a/src/components/AuthImage.js +++ b/src/components/AuthImage.js @@ -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 (); } } +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,