Updated placeholder component structures
• Updated: - placeholder component structures
This commit is contained in:
@@ -2,26 +2,8 @@ import { defineMessages, injectIntl } from 'react-intl'
|
||||
import ContentLoader from 'react-content-loader'
|
||||
import { DEFAULT_THEME } from '../../constants'
|
||||
|
||||
const messages = defineMessages({
|
||||
loading: { id: 'loading_indicator.label', defaultMessage: 'Loading..' },
|
||||
})
|
||||
|
||||
const mapStateToProps = (state) => ({
|
||||
theme: state.getIn(['settings', 'displayOptions', 'theme'], DEFAULT_THEME),
|
||||
})
|
||||
|
||||
export default
|
||||
@injectIntl
|
||||
@connect(mapStateToProps)
|
||||
class PlaceholderLayout extends PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
children: PropTypes.node,
|
||||
intl: PropTypes.object.isRequired,
|
||||
theme: PropTypes.string.isRequired,
|
||||
viewBox: PropTypes.object.isRequired,
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
intl,
|
||||
@@ -46,4 +28,21 @@ class PlaceholderLayout extends PureComponent {
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
const messages = defineMessages({
|
||||
loading: { id: 'loading_indicator.label', defaultMessage: 'Loading...' },
|
||||
})
|
||||
|
||||
const mapStateToProps = (state) => ({
|
||||
theme: state.getIn(['settings', 'displayOptions', 'theme'], DEFAULT_THEME),
|
||||
})
|
||||
|
||||
PlaceholderLayout.propTypes = {
|
||||
children: PropTypes.node,
|
||||
intl: PropTypes.object.isRequired,
|
||||
theme: PropTypes.string.isRequired,
|
||||
viewBox: PropTypes.object.isRequired,
|
||||
}
|
||||
|
||||
export default injectIntl(connect(mapStateToProps)(PlaceholderLayout))
|
||||
|
||||
Reference in New Issue
Block a user