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
<NumericRefinementListFilter | |
id="booksCount" | |
title="Books Count" | |
field="books_count" | |
options={[ | |
{ title: 'All' }, | |
{ title: 'up to 50', from: 0, to: 50 }, | |
{ title: '51 to 100', from: 51, to: 100 }, | |
{ title: '100 or more', from: 101, to: 10000 }, | |
]} |
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
<RangeSlider | |
dataField="original_publication_year" | |
range={{ | |
start: 1880, | |
end: 2019, | |
}} | |
rangeLabels={{ | |
start: '1880', | |
end: '2019', | |
}} |
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
<RangeFilter | |
min={1880} | |
max={2019} | |
field="original_publication_year" | |
id="publicationYear" | |
title="Publication Year" | |
showHistogram | |
/> |
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
<MultiList | |
dataField="authors.keyword" | |
showSearch={false} | |
title="Authors" | |
componentId="authors" | |
queryFormat="or" | |
/> |
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
<RefinementListFilter | |
id="authors" | |
title="Authors" | |
field="authors.keyword" | |
operator="OR" | |
size={10} | |
/> |
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
<div className={container}> | |
<ReactiveList | |
pagination | |
componentId="results" | |
react={{ | |
and: ["search"] | |
}} | |
dataField="title.keyword" | |
> | |
{({ loading, data, error }) => { |
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
const ResultCard = props => { | |
const { | |
result: { _id, _source }, | |
} = props; | |
return ( | |
<div className={resultCard} key={_id}> | |
<img src={_source.image} alt={_source.title} /> | |
<h1>{_source.title}</h1> | |
</div> | |
); |
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
<div className={container}> | |
<div className={resultWrapper}> | |
<Hits hitsPerPage={50} highlightFields={['title']} itemComponent={ResultCard} /> | |
</div> | |
<Pagination showNumbers /> | |
<NoHits | |
translations={{ | |
'NoHits.NoResultsFound': 'No movies found were found for {query}', | |
'NoHits.DidYouMean': 'Search for {suggestion}', | |
'NoHits.SearchWithoutFilters': 'Search for {query} without filters', |