mirror of
https://github.com/Doodle3D/Doodle3D-Core.git
synced 2024-11-14 18:17:56 +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');
|
// const debug = createDebug('d3d:FileThumb');
|
||||||
|
|
||||||
class AuthImage extends React.Component {
|
class AuthImage extends React.Component {
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.state = {
|
||||||
|
src: null
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
const { src, token, password } = this.props;
|
const { src, token, password } = this.props;
|
||||||
|
|
||||||
@ -53,10 +61,6 @@ AuthImage.propTypes = {
|
|||||||
token: PropTypes.string,
|
token: PropTypes.string,
|
||||||
password: PropTypes.string
|
password: PropTypes.string
|
||||||
};
|
};
|
||||||
AuthImage.state = {
|
|
||||||
src: null
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
export default connect(state => ({
|
export default connect(state => ({
|
||||||
token: state.user.session.token,
|
token: state.user.session.token,
|
||||||
|
Loading…
Reference in New Issue
Block a user