UNPKG

@wenn/onb

Version:

onb-core

29 lines (23 loc) 556 B
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; const DesktopHOC = Component => { class Desktop extends React.Component { render() { return <Component {...this.props} />; } } Desktop.propTypes = { wording: PropTypes.object.isRequired, assets: PropTypes.object.isRequired }; const mapState = ({ settings: { wording, assets } }) => ({ wording: wording.landing, assets }); return connect( mapState, null )(Desktop); }; export default DesktopHOC;