mirror of
https://github.com/Doodle3D/Doodle3D-Core.git
synced 2024-11-05 06:03: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');
|
// const debug = createDebug('d3d:FileThumb');
|
||||||
|
|
||||||
class AuthImage extends React.Component {
|
class AuthImage extends React.Component {
|
||||||
constructor() {
|
static propTypes = {
|
||||||
super();
|
dispatch: PropTypes.func,
|
||||||
|
src: PropTypes.string.isRequired,
|
||||||
|
token: PropTypes.string,
|
||||||
|
password: PropTypes.string
|
||||||
|
};
|
||||||
|
|
||||||
this.state = {
|
state = {
|
||||||
src: null
|
src: null
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
const { src, token, password } = this.props;
|
const { src, token, password } = this.props;
|
||||||
@ -55,12 +58,6 @@ class AuthImage extends React.Component {
|
|||||||
return (<img { ...props } src={this.state.src} />);
|
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 => ({
|
export default connect(state => ({
|
||||||
token: state.user.session.token,
|
token: state.user.session.token,
|
||||||
|
@ -18,12 +18,27 @@ const styles = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class DoodlePreview extends React.Component {
|
class DoodlePreview extends React.Component {
|
||||||
constructor() {
|
static defaultProps = {
|
||||||
super();
|
width: 720,
|
||||||
this.state = {
|
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
|
scene: null
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
let { docData, sketchData } = this.props;
|
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);
|
export default injectSheet(styles)(DoodlePreview);
|
||||||
|
Loading…
Reference in New Issue
Block a user