/** * External dependencies */ import { Component } from '@wordpress/element'; import { withSelect } from '@wordpress/data'; /** * WooCommerce dependencies */ import { SETTINGS_STORE_NAME } from '@woocommerce/data'; /** * Internal dependencies */ import './style.scss'; class Navigation extends Component { renderMenuItem( item, depth = 0 ) { const { slug, title, url } = item; return (
  • { title } { item.children && item.children.length && ( ) }
  • ); } render() { const { items } = this.props; return (
    ); } } export default withSelect( ( select ) => { const items = select( SETTINGS_STORE_NAME ).getSetting( 'wc_admin', 'wcNavigation' ); return { items }; } )( Navigation );