mirror of
https://github.com/Doodle3D/Doodle3D-Core.git
synced 2024-11-04 21:53:24 +01:00
move static props
This commit is contained in:
parent
1de526f83f
commit
7aac749d77
@ -7,13 +7,16 @@ import PouchDB from 'pouchdb';
|
||||
// const debug = createDebug('d3d:FileThumb');
|
||||
|
||||
class AuthImage extends React.Component {
|
||||
constructor() {
|
||||
super();
|
||||
static propTypes = {
|
||||
dispatch: PropTypes.func,
|
||||
src: PropTypes.string.isRequired,
|
||||
token: PropTypes.string,
|
||||
password: PropTypes.string
|
||||
};
|
||||
|
||||
this.state = {
|
||||
src: null
|
||||
};
|
||||
}
|
||||
state = {
|
||||
src: null
|
||||
};
|
||||
|
||||
componentWillMount() {
|
||||
const { src, token, password } = this.props;
|
||||
@ -55,12 +58,6 @@ 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
|
||||
};
|
||||
|
||||
export default connect(state => ({
|
||||
token: state.user.session.token,
|
||||
|
@ -18,12 +18,27 @@ const styles = {
|
||||
};
|
||||
|
||||
class DoodlePreview extends React.Component {
|
||||
constructor() {
|
||||
super();
|
||||
this.state = {
|
||||
scene: null
|
||||
};
|
||||
}
|
||||
static defaultProps = {
|
||||
width: 720,
|
||||
height: 480,
|
||||
pixelRatio: 1
|
||||
};
|
||||
|
||||
static propTypes = {
|
||||
classes: PropTypes.objectOf(PropTypes.string),
|
||||
width: PropTypes.number.isRequired,
|
||||
height: PropTypes.number.isRequired,
|
||||
pixelRatio: PropTypes.number.isRequired,
|
||||
sketchData: PropTypes.object, // TODO
|
||||
docData: PropTypes.shape({
|
||||
appVersion: PropTypes.string,
|
||||
data: PropTypes.string
|
||||
})
|
||||
};
|
||||
|
||||
state = {
|
||||
scene: null
|
||||
};
|
||||
|
||||
async componentDidMount() {
|
||||
let { docData, sketchData } = this.props;
|
||||
@ -65,21 +80,5 @@ class DoodlePreview extends React.Component {
|
||||
);
|
||||
}
|
||||
}
|
||||
DoodlePreview.defaultProps = {
|
||||
width: 720,
|
||||
height: 480,
|
||||
pixelRatio: 1
|
||||
};
|
||||
DoodlePreview.propTypes = {
|
||||
classes: PropTypes.objectOf(PropTypes.string),
|
||||
width: PropTypes.number.isRequired,
|
||||
height: PropTypes.number.isRequired,
|
||||
pixelRatio: PropTypes.number.isRequired,
|
||||
sketchData: PropTypes.object, // TODO
|
||||
docData: PropTypes.shape({
|
||||
appVersion: PropTypes.string,
|
||||
data: PropTypes.string
|
||||
})
|
||||
};
|
||||
|
||||
export default injectSheet(styles)(DoodlePreview);
|
||||
|
Loading…
Reference in New Issue
Block a user