File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ class LibraryItemComponent extends React.PureComponent {
4444 const selectionMessage = this . props . intl . formatMessage (
4545 this . props . isSelected ? messages . unselect : messages . select
4646 ) ;
47- const favorite = (
47+ const favorite = this . props . hideFavorite ? null : (
4848 < button
4949 className = { classNames ( styles . favoriteContainer , { [ styles . active ] : this . props . favorite } ) }
5050 onClick = { this . props . onFavorite }
@@ -340,6 +340,7 @@ LibraryItemComponent.propTypes = {
340340 text : PropTypes . string
341341 } ) ) ,
342342 favorite : PropTypes . bool ,
343+ hideFavorite : PropTypes . bool ,
343344 onFavorite : PropTypes . func ,
344345 onBlur : PropTypes . func . isRequired ,
345346 onClick : PropTypes . func . isRequired ,
Original file line number Diff line number Diff line change @@ -1330,6 +1330,7 @@ class ExtensionLibrary extends React.PureComponent {
13301330 return {
13311331 actionLabel : this . getActionLabel ( item ) ,
13321332 badges,
1333+ hideFavorite : item . isCCWLoad ,
13331334 sourceLabel : item . sourceLabel ,
13341335 sourceTone : sourceToneMap [ item . source ] || 'Other'
13351336 } ;
Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ class LibraryItem extends React.PureComponent {
171171 docsURI = { this . props . docsURI }
172172 samples = { this . props . samples }
173173 favorite = { this . props . favorite }
174+ hideFavorite = { this . props . hideFavorite }
174175 onFavorite = { this . handleFavorite }
175176 actionLabel = { this . props . actionLabel }
176177 badges = { this . props . badges }
@@ -244,6 +245,7 @@ LibraryItem.propTypes = {
244245 text : PropTypes . string
245246 } ) ) ,
246247 favorite : PropTypes . bool ,
248+ hideFavorite : PropTypes . bool ,
247249 onFavorite : PropTypes . func ,
248250 onMouseEnter : PropTypes . func . isRequired ,
249251 onMouseLeave : PropTypes . func . isRequired ,
You can’t perform that action at this time.
0 commit comments