mirror of
https://github.com/Doodle3D/Doodle3D-Core.git
synced 2024-12-22 11:03:48 +01:00
move state to constructor
This commit is contained in:
parent
193ed418b9
commit
7d707894cc
@ -7,6 +7,14 @@ import PouchDB from 'pouchdb';
|
||||
// const debug = createDebug('d3d:FileThumb');
|
||||
|
||||
class AuthImage extends React.Component {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.state = {
|
||||
src: null
|
||||
};
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
const { src, token, password } = this.props;
|
||||
|
||||
@ -53,10 +61,6 @@ AuthImage.propTypes = {
|
||||
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