Updated placeholder component structures

• Updated:
- placeholder component structures
This commit is contained in:
mgabdev
2020-08-14 12:44:58 -05:00
parent 261ba8937b
commit 67e1082cf5
8 changed files with 76 additions and 79 deletions

View File

@@ -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))