@@ -187,30 +187,28 @@ export function getFilterIconAndLabel(
187
187
entityRegistry . getIcon ( EntityType . DataPlatform , size || 12 , IconStyleType . ACCENT , ANTD_GRAY [ 9 ] )
188
188
) ;
189
189
label = filterEntity ? entityRegistry . getDisplayName ( EntityType . DataPlatform , filterEntity ) : filterValue ;
190
+ } else if ( filterField === CONTAINER_FILTER_NAME ) {
191
+ // Scenario where the filter entity exists and filterField is container
192
+ const logoUrl = ( filterEntity as Container ) ?. platform ?. properties ?. logoUrl ;
193
+ icon = logoUrl ? (
194
+ < PlatformIcon src = { logoUrl } size = { size } />
195
+ ) : (
196
+ entityRegistry . getIcon ( EntityType . DataPlatform , size || 12 , IconStyleType . ACCENT , ANTD_GRAY [ 9 ] )
197
+ ) ;
198
+ label = entityRegistry . getDisplayName ( EntityType . Container , filterEntity )
190
199
} else if ( filterField === BROWSE_PATH_V2_FILTER_NAME ) {
191
200
icon = < FolderFilled size = { size } color = "black" /> ;
192
201
label = getLastBrowseEntryFromFilterValue ( filterValue ) ;
193
202
} else if ( filterEntity ) {
194
- // Scenario where the filter entity exists and filterField is container
195
- if ( filterField === CONTAINER_FILTER_NAME ) {
196
- const logoUrl = ( filterEntity as Container ) ?. platform ?. properties ?. logoUrl ;
197
- icon = logoUrl ? (
198
- < PlatformIcon src = { logoUrl } size = { size } />
199
- ) : (
200
- entityRegistry . getIcon ( EntityType . DataPlatform , size || 12 , IconStyleType . ACCENT , ANTD_GRAY [ 9 ] )
201
- ) ;
202
- label = entityRegistry . getDisplayName ( filterEntity . type , filterEntity ) ;
203
- } else {
204
- const { icon : newIcon , label : newLabel } = getFilterWithEntityIconAndLabel (
205
- filterValue ,
206
- entityRegistry ,
207
- filterEntity ,
208
- size ,
209
- ) ;
210
-
211
- icon = newIcon ;
212
- label = newLabel ;
213
- }
203
+ const { icon : newIcon , label : newLabel } = getFilterWithEntityIconAndLabel (
204
+ filterValue ,
205
+ entityRegistry ,
206
+ filterEntity ,
207
+ size ,
208
+ ) ;
209
+
210
+ icon = newIcon ;
211
+ label = newLabel ;
214
212
} else {
215
213
label = filterValue ;
216
214
}
0 commit comments