@@ -94,14 +94,19 @@ class ListItem extends Component {
9494 * @returns {JSX.Element }
9595 */
9696 renderIcon ( ) {
97- const { contentTypeIdentifier, selected } = this . props ;
97+ const { contentTypeIdentifier, selected, locationId } = this . props ;
9898 const iconAttrs = {
9999 extraClasses : `ez-icon--small ez-icon--${ selected ? 'light' : 'dark' } ` ,
100100 } ;
101101
102102 if ( ! this . state . isLoading || this . props . subitems . length ) {
103- iconAttrs . customPath =
104- eZ . helpers . contentType . getContentTypeIconUrl ( contentTypeIdentifier ) || eZ . helpers . contentType . getContentTypeIconUrl ( 'file' ) ;
103+ if ( locationId === 1 ) {
104+ iconAttrs . customPath = eZ . helpers . contentType . getContentTypeIconUrl ( 'folder' ) ;
105+ } else {
106+ iconAttrs . customPath =
107+ eZ . helpers . contentType . getContentTypeIconUrl ( contentTypeIdentifier ) ||
108+ eZ . helpers . contentType . getContentTypeIconUrl ( 'file' ) ;
109+ }
105110 } else {
106111 iconAttrs . name = 'spinner' ;
107112 iconAttrs . extraClasses = `${ iconAttrs . extraClasses } ez-spin` ;
@@ -153,11 +158,12 @@ class ListItem extends Component {
153158 }
154159
155160 renderItemLabel ( ) {
156- if ( this . props . isRootItem ) {
161+ const { totalSubitemsCount, href, name, selected, locationId } = this . props ;
162+
163+ if ( locationId === 1 ) {
157164 return null ;
158165 }
159166
160- const { totalSubitemsCount, href, name, selected } = this . props ;
161167 const togglerClassName = 'c-list-item__toggler' ;
162168 const togglerAttrs = {
163169 className : togglerClassName ,
0 commit comments