-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #506 from mlibrary/LIBSEARCH-968-articles-results-…
…in-everything-results-view-have-no-truncation-on-author-data-displayed [LIBSEARCH-968] Articles results in Everything results view have no truncation on author data displayed
- Loading branch information
Showing
7 changed files
with
36 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import PropTypes from 'prop-types'; | ||
import React from 'react'; | ||
|
||
const RecommendedResource = ({ record }) => { | ||
const isRecommended = record.fields.some((item) => { | ||
return item.uid === 'highly_recommended'; | ||
const RecommendedResource = ({ fields = [] }) => { | ||
const isRecommended = fields.some(({ uid }) => { | ||
return uid === 'highly_recommended'; | ||
}); | ||
|
||
return isRecommended ? <span className='recommended-resource-tag strong'>Recommended</span> : null; | ||
}; | ||
|
||
RecommendedResource.propTypes = { | ||
record: PropTypes.object | ||
fields: PropTypes.array | ||
}; | ||
|
||
export default RecommendedResource; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters